Need job

Looking for job in Europe. Please contact thru LinkedIn profile.

Friday, July 18, 2014

Xcode auto layout - how to fill removed control space automatically

How to automatically transform picture 1 to pic 2?

pic 1
pic 2

Its all about constraint priority and redundancy.
Priority of space between grey and blue element is higher that grey and bottom of screen.

 

Now if remove blue you will get Pic 2 scene.

Thursday, April 3, 2014

How to use UIRefreshControl without UITableViewController

Exact problem is - How to use static ui elements with table and refresh control.
All you need is storyboard)
This can be achieved with Container view.

The result is:

Monday, March 17, 2014

Objective-C deprecated method mark

Its very useful for big or distributed teams.
To achieve this:

you need to edit the declaration of method to:

- (BOOL)loginComplexWith:(NSArray*)loginTypes andDelegate:(id<LoginComplexDelegate>)delegate __attribute__ ((deprecated));

or you can use DEPRECATED_ATTRIBUTE from <AvailabilityMacros.h>

Thursday, November 14, 2013

How to hide keyboard without first responder

In any place call:
[self.view endEditing:true];
will hide keyboard. 

So, result the same as you call [sender resignFirstResponder] but in this case you need an object or you need to find him.

Friday, August 23, 2013

UITableView custom Separator Insets workaround

Hello everybody.
Here is a workaround when you try to set custom separator insets thru IB in Xcode Version 5.0 (5A11365j).
If you try, you will get:
Exception while running ibtool: *** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver cannot encode structs

Fix with coding:

UIEdgeInsets edges;
edges.left = 0;
tableTripPoints.separatorInset = edges;

Thursday, August 15, 2013

How to change "Placeholder" text colour for UITextField

You need to assign colour for key path "_placeholderLabel.textColor" in User defined runtime attributes.
Its simple and "no coding".


Wednesday, August 14, 2013

Make view controller transparent

You need to place a view controller in to "Container view".
Its new iOS 6 control.
Then you just need to change an alpha to desired value.
Thats it!