Tagged Questions
-2
votes
1answer
42 views
Getting an Instance Method to return a string [duplicate]
This should be simple but I'm clearly doing something painfully wrong. I want to write a test method that returns a string.
In my classTest.h I have
@interface classTest : NSObject
- (NSString ...
0
votes
1answer
21 views
How to sort array of strings in which string contains numbers in it [duplicate]
I would like to sort an array of custom objects based on the name(NSString) variable. The name variable can have numbers in the end.
Unsorted data: Tank 1, Tank 2, Tank 10, Tank 32, Tank 3, Tank 11
...
0
votes
1answer
25 views
Parse contents within the HTML tag in iphone
I am loading,html contents to list in the UILabel.I was able to remove the tags and append the contents.The problem is there are certain cases where content like Is it y=2 or x>2,y<1 Hello x = ...
-2
votes
0answers
33 views
NSDateFormatter - setDateFormat to use [duplicate]
Hello guys I am retrieving from a database several strings that represent a date with this string format:
"2013-06-16T16:52:36Z"
what kind of format I have to use in order to transform this NSString ...
-2
votes
3answers
64 views
Extracting a name from a String
I'm quite new to NSString manipulation and don't have much experience at all of manipulating strings in any language really.
My problem is that I have a string that contains a lot of data, within ...
0
votes
3answers
36 views
Convert NSString to UIColor
I have an array full of NSStrings and I need to use an NSString to change the color on an attributed text. I seperated the original NSString into an array containing the single NSString with the color ...
-1
votes
3answers
50 views
How to compare NSString value with NSMutableDictionary key in iPhone?
I'm new in development. I don't understand why its not working my code is below
if(selectAnswer == [[self.testQuesArray objectAtIndex:0]objectForKey:@"correct_answer"]
{
NSLog(@"Correct Answer");
...
3
votes
1answer
47 views
Not getting correct index for the char in String
I have a string like "What is it in rain"
I need to add blink under each character that needs to be typed through keyboard.
So I find the character using [characterAtIndex]..
But when I reach to the ...
0
votes
2answers
31 views
How to extract and remove scheme name from NSURL?
What is proper way to extract and remove scheme name and :// from a NSURL?
For example:
note://Hello -> @"Hello"
calc://3+4/5 -> @"3+4/5"
so
NSString *scheme = @"note://";
NSString ...
0
votes
0answers
38 views
Parsing tweets to clickable links in my webview
I am trying to parse my tweets into clickable links for mentions, hashtags and links. The hashtags and links are working. But there is something wrong with my mentions part...
This is for example a ...
0
votes
1answer
34 views
Separate html string using componentsSeparatedByString
I am getting the following html response from server.
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td id="text">
test data
...
0
votes
1answer
43 views
Replace characters with accents - ios
I've been searching for a solution to my issue and cant find anything at all.
I want to replace the content of a NSString like this "Depósitos y Préstamos" into this "Depósitos y Préstamos".
Any ...
0
votes
2answers
242 views
NSString Class - Sample Code Online
Lets say I just want to NSLog a string - can someone explain the difference between:
Code 1:
NSString *testString;
testString = [[NSString alloc] init];
testString = @"Here's a test string in ...
1
vote
2answers
51 views
Make NSDate Equal to NSString
I have a string:
stringValue = 2013-06-11 06:01:28.
When i try to convert it using NSDateFormatter it becomes like this: date = 2013-06-10 22:01:28 +0000.
I've read that they are the same point in ...
0
votes
1answer
24 views
convert python string to nsdictionary
I have a tcp server in Python (using twisted) and many clients, one of which is iOS. When the connections is established, my server sends a python dictionary converted to string to the clients:
...