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

Convert UTC NSDate to local Timezone Objective-C

How do I convert a UTC NSDate to local timezone NSDate in Objective C?

iOS 9 not opening Instagram app with URL SCHEME

The following URL opens on iOS 8.3 and lower, but it does not work and iOS 9 let instagramURL = NSURL(string: “instagram://app”) Why won’t the URL open?

How to make a clickable link in an NSAttributedString for a

It’s trivial to make hyperlinks clickable in a UITextView. You just set the “detect links” checkbox on the view in IB, and it detects http links and turns them into hyperlinks. However, that still means that what the user sees is the “raw” link. RTF files and HTML both allow you to set up a […]

Create singleton using GCD's dispatch_once in Objective C

If you can target iOS 4.0 or above Using GCD, is it the best way to create singleton in Objective C (thread safe)? + (instancetype)sharedInstance { static dispatch_once_t once; static id sharedInstance; dispatch_once(&once, ^{ sharedInstance = [[self alloc] init]; }); return sharedInstance; }

Set the maximum character length of a UITextField

How can I set the maximum amount of characters in a UITextField on the iPhone SDK when I load up a UIView?

Scroll View in my app doesn't work on iOS 11

My scrollview in app doesn’t scroll. Because it’s UIView and sets as a custom class, and reference UIViewScroll. It’s work iOS 10 and lower versions but doesn’t work on iOS 11. So how can I fix without recreate scroll view. Project created with Xcode 7 and swift 2.2, and updated swift 3 with Xcode 8.

UIButton can't be touched while animated with UIView animateWithDuration

I have the following code: [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationCurveEaseOut | UIViewAnimationOptionAllowUserInteraction animations:^{ CGRect r = [btn frame]; r.origin.y -= 40; [btn setFrame: r]; } completion:^(BOOL done){ if(done){ [UIView animateWithDuration:0.3 delay:1 options:UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionAllowUserInteraction animations:^{ CGRect r = [btn frame]; r.origin.y += 40; [btn setFrame: r]; } completion:^(BOOL done){if(done) zombiePopping = 0; }]; } }]; The […]

How disable Copy, Cut, Select, Select All in UITextView

The UITextView‘s Copy, Cut, Select, Select All functionality is shown by default when I press down on the screen. But, in my project the UITextField is only read only. I do not require this functionality. Please tell me how to disable this feature.

how to create iphone's wobbling icon effect?

I want to wobble an image back and forth in my application similar to how the iPhone icons wobble when you press down on it. What’s the best way to do that? This is my first foray into animations that’s not using an animated GIF. I think the idea is to slightly rotate the image […]

Is there a good charting library for iPhone?

I have a need to render and display charts (bar charts for now, but more types may be needed later) in an iPhone app I’m working on. I’ve done some looking around and it doesn’t look like there are any really good, mature charting libraries for iPhone yet. I’ve also looked for something written for […]