iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

UILabel with text of two different colors

I want to display a string like this in a UILabel: There are 5 results. Where the number 5 is red in color and the rest of the string is black. How can I do this in code?

What iPhone devices will run on armv7s and arm64?

What are all the supported ios devices that can run on armv7s and arm64. In other words, which market would i be excluding if I did not include armv7 in my build architectures? I’m curious about armv7s, not armv7. I thought this would be a basic google search but failing to find a clear answer.

findObjectsInBackgroundWithBlock: gets data from Parse, but data only exists inside the block

I made the following test class to try out retrieving data from Parse: -(void)retrieveDataFromParse { PFQuery *query = [PFQuery queryWithClassName:@”TestObject”]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if(!error){ for (PFObject *object in objects){ NSString *nameFromObject = [NSString stringWithFormat:@”%@”, [object objectForKey:@”Name”]]; NSString *dateFromObject = [NSString stringWithFormat:@”%@”, [object createdAt]]; NSString *scoreFromObject = [NSString stringWithFormat:@”%@”, [object objectForKey:@”Score”]]; [self addNewScore:scoreFromObject […]

How to compare two UIImage objects

I am developing one application.In that i am using the imageviews.SO before changeing the UIImageview image I need to take that image in UIimage obejct and compare with another UIImage object for finding both are sam or not. So please tell me how to do that one.

UIImage(contentsOfFile:) returning nil despite file existing in caches directory

I’m trying to save a snapshot of a map with an overlay in the caches directory and retrieve it when it exists. However, despite the file being created, UIImage(contentsOfFile:) returns nil when I try to retrieve it. I’ve printed the file paths for both write and read and they are the same and have verified […]

Convert JSON feed to NSDictionary

Where JSON_CATEGORY_DATA_URL_STRING is my feed URL, which returns fine as: [ { “group”:”For Sale”, “code”:”SSSS” }, { “group”:”For Sale”, “category”:”Wanted”, “code”:”SWNT” } ] I cannot seem to get a nice NSDictionary (or NSArray) out of the following code: + (NSDictionary *)downloadJSON { NSDictionary *json_string; NSString *dataURL = [NSString stringWithFormat:@”%@”, JSON_CATEGORY_DATA_URL_STRING]; NSLog(@”%@”,dataURL); NSURLRequest *request = [NSURLRequest […]

How to scroll to the bottom of a UITableView on the iPhone before the view appears

I have a UITableView that is populated with cells of a variable height. I would like the table to scroll to the bottom when the view is pushed into view. I currently have the following function NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[log count]-1 inSection:0]; [self.table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO]; log is a mutable array containing the objects […]

Displaying a stock iOS notification banner when your app is open and in the foreground?

When Apple’s official iOS Messages app is open and in the foreground, new messages from other contacts trigger a stock, native iOS notification alert banner. See image below. Is this possible in 3rd party apps on the App Store? Local and/or Push Notifications for your app while your app is open and in the foreground? […]

iBeacon Notification when the app is not running

I managed to make an iBeacon which triggers a local push notification on my iPhone when the beacon is in range. It’s perfectly working when the app is in background mode. My question is: Can I trigger the notification even when the app is not running, not even in the background? I thought this was […]

Xml parsing in iOS tutorial

Hi i’m creating an app which have to print a value in label from an xml file in server.I tried reading some of documentation under google search..but i can’t find it…Does any one know simple tutorial or any sample code that is used to integrate xml parsing in my app.