Breaking News
Home / iOS / ObjectiveC (page 2)

ObjectiveC

How to print NSMutableArray in Objective C?

Solution NSMutableArray array = nil; array = [NSMutableArray arrayWithObjects:@”Hat”, @”Bat”, @”Mat” nil]; // method 1 NSLog(@”array: %@”, array); // method2 for (id obj in array)   NSLog(@”obj: %@”, obj); [pb_builder]

Read More »

How to clean phone number string in Objective C?

+(NSString*) cleanPhoneNumber:(NSString*) input {     NSString *output = @""; for (int i=0; i<[input length]; i++) {     if (isdigit([input characterAtIndex:i])) {       output=   [output  stringByAppendingFormat:@"%c",[input characterAtIndex:i]];     } }         return  output; } [pb_builder]

Read More »