10. Two fingers gesture on UIScrollView

Most of the times we want to do something different in iOS apps, one of them is two go for 2 finger scroll instead of 1, so that we can have some other control like UITextView in 1 finger scroll. So here is the code to have this:

for (UIGestureRecognizer *gestureObj in self.detailContainerScrollView.gestureRecognizers) {
if ([gestureObj isKindOfClass:[UIPanGestureRecognizer class]])
UIPanGestureRecognizer *panObj = (UIPanGestureRecognizer *) gestureObj;
panObj.minimumNumberOfTouches = 2;
panObj.maximumNumberOfTouches = 2;

9. iPod touch / iPhone 1st gen, 2nd gen and Xcode 4

Ever since Xcode 4 has come out, many people are having trouble running their apps on older version of iOS devices. With few manipulations here and there in XCode and in device, you can definitely find a work around… Here are my findings..

1. Try to rename the scheme at XCode 4, you can do this as follows:
Go to Xcode->Product->Manage Scheme. Then click on the setting icon at the bottom of popup, select Duplicate. Delete the older one. Restart Xcode and also reconnect device.

2. In Build Setting of Project and Target, make sure your Architecture is armv6 $(ARCHS_STANDARD_32_BIT) or armv6 armv7.

3. In -Info.plist file, find “Required device capabilities” and delete “armv7”.

4. Try resetting the device’s Date and time to current date and time, even if it is already set to current. Go to Settings->General->Date And Time.

Hope any of the above steps may help you to beat this annoying and time killing bug…