iPhone App Icons – Exact Radius?

You can make four icons (as of today) for your app and they can all have a different look – not necessarily based on the 512×512 image. corner radius for the 512×512 icon = 80 (iTunesArtwork) corner radius for the 1024×1024 icon = 180 (iTunesArtwork Retina) corner radius for the 57×57 icon = 9 (iPhone/iPod … Read more

What are best practices that you use when writing Objective-C and Cocoa? [closed]

There are a few things I have started to do that I do not think are standard: 1) With the advent of properties, I no longer use “_” to prefix “private” class variables. After all, if a variable can be accessed by other classes shouldn’t there be a property for it? I always disliked the … Read more

Proper way to renew distribution certificate for iOS

Your live apps will not be taken down. Nothing will happen to anything that is live in the app store. Once they formally expire, the only thing that will be impacted is your ability to sign code (and thus make new builds and provide updates). Regarding your distribution certificate, once it expires, it simply disappears … Read more

UILongPressGestureRecognizer gets called twice when pressing down

UILongPressGestureRecognizer is a continuous event recognizer. You have to look at the state to see if this is the start, middle or end of the event and act accordingly. i.e. you can throw away all events after the start, or only look at movement as you need. From the Class Reference: Long-press gestures are continuous. … Read more

How to dismiss keyboard for UITextView with return key?

Figured I would post the snippet right here instead: Make sure you declare support for the UITextViewDelegate protocol. – (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if([text isEqualToString:@”\n”]) { [textView resignFirstResponder]; return NO; } return YES; } Swift 4.0 update: func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { if text == … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)