How to Disable ARC for files in a project? Xcode

ARC can be disabled for a single or group of files in a project. Adding -fno-objc-arc  compiler flag for the selected files in Target->Build Phases -> Compile Sources disables ARC for those files. You can do it in simple two steps Go to Target – > Build Phases-> Compile Sources Select File/Files for which you want … Read more

Passing Data between View Controllers

A ViewController in an application is seldom standalone in nature. They require data from ViewControllers in front and from those behind them, this leaves us with two types of data passing Forward Data passing Backward data passing For discussing both kinds of data passing we have two ViewCotrollers ASViewController ASViewControllerB Forward data passing between ViewControllers … Read more

Xcode: Failed to update auto layout status

Once in a while we come across a situation where our storyboard or xib does not show the UI but only the frames with blue lines marking the views. This issue is caused due to Xcode not being able to read autolayouts and are more frequent on slow macs. The problem can be solved in … Read more

Resolving jerky UITableView Scroll

Hi We all have faced situation where scrolling of table view is not smooth.There can be many causes for the same. In order to speedup the scroll we can do a quick check 1.Avoid drawing. 2.Avoid manipulating layers. 3.Try to return cell as quickly as possible.for that you can move the data feeding for the … Read more

Dynamic height UITableViewCell using Auto layouts

How to create dynamic height tableview cell has been a very daunting task especially when you have to calculate and return variable row height in [code]- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;[/code] But with autolayouts its very simple.you just have to make sure that the constraints of the tableview cell subviews are added in such a way … Read more

iOS 8 CLLocationManager asking for user permission

Pre iOS 8 it was enough to allocate location manager object to generate a permission request locationManager=[[CLLocationManager alloc] init]; but post iOS8 things have changed, in order to initiate the the request for location information you have to do following steps Add keys in info plist NSLocationWhenInUseUsageDescription   : against this key description of the … Read more

Dealing with async calls and block.

Hi All There are always disadvantages of retaining “self” in side block we can work around it using __block or __weak ref of self. but the ideal way is as we call it strong weak dance. it goes like this __weak typeOf(self)ref=self;  //making weak ref of self ^( ){ __strong typeOf(ref)strongSelf=ref;   // converting it back … Read more

Block for excuting task after fixed interval give NSTimer a miss

Hi, If ever you feel the need to repeat a task after say 5 seconds and you feel nastimer is too clumsy to use then you can use…   void runBlockEveryMinute(int *breakCondition, dispatch_block_t block) { if(*breakCondition==0) { return; } block(); // initial block call // get the current time struct timespec startPopTime; gettimeofday((struct timeval *) … Read more

Gate2Play and iOS integration.

HI, If you are making an application which targets middle east then you will come across a payement gateway  provider gate2play .The apis mentioned are al for web portal and FAQ states that it can be used on mobile platform  but Ok so i spend my whole day and finally integrated it and now i … Read more

NEED A JOB? NEED TO HIRE? NEED HELP?

Join group of Software Professionals

iOS DEVELOPER’S DEN