iOS & macOS development
131.9K views | +0 today
iOS & macOS development
cool tips and source code for Cocoa, Swift and Objective-C
Curated by Alessio Nonni
Your new post is loading...
Your new post is loading...
Scoop.it!

FacebookLikeView

FacebookLikeView | iOS & macOS development | Scoop.it

FacebookLikeView is a Facebook Like button that fits nicely into your native iOS application.


It integrates with the Facebook iOS SDK so that already-authenticated users can "like" with a single tap, and unauthenticated users can are prompted with the native login dialog.


It comes with some caveats; it's not officially supported by Facebook, and it requires your application to use the in-app auth dialog rather than single sign-on via Safari or the Facebook app.

No comment yet.
Scoop.it!

Ownership of presented view controllers with and without ARC

Yesterday, I tweeted a classical design issue on who should own a view controller.


Mugunth Kumar ()@mugunthkumar
The controller that presents a modal controller should dismiss it. Don't do [self dismissModalViewControllerAnimated:NO] in the child.

25 Feb 12 ReplyRetweetFavorite


Mugunth Kumar ()@mugunthkumar
Calling [self dismissModalViewControllerAnimated:NO] on child is like committing seppuku. A child shouldn't kill itself.
25 Feb 12 ReplyRetweetFavorite


The negative replies I received to the tweet were phenomenal that I had to write this post explaining the “why” behind the tweet.

No comment yet.
Scoop.it!

ARC Gotcha – Unexpectedly Short Lifetimes

ARC Gotcha – Unexpectedly Short Lifetimes | iOS & macOS development | Scoop.it

One of our engineers was working on a project and wrote some code that crashed when running on a device:


CGColorRef color =
[UIColor colorWithRed: 0.2
green: 0.3
blue: 0.4
alpha: 1.0].CGColor;
[[self.view layer]
setBackgroundColor: color];


It looks reasonable. Could it be a toolkit bug? It’d be weird for something to be so obviously broken in a fundamental CoreAnimation call. It’s like the CGColor is pointing to garbage when it gets used. Almost as if the newly-created UIColor suddenly vanished and took the CGColor down with it.

No comment yet.
Scoop.it!

New Objective-C literal syntax for NSArray, NSDictionary

Apple committed a new patch to the llvm project adding support for new Objective-C literal syntax for NSArray, NSDictionary and NSNumber. These have previously been documented in the Mountain Lion Xcode release notes but that was still under NDA. Now that these features have been committed to llvm I guess we’re allowed to speak about it.

No comment yet.
Scoop.it!

nimbus

nimbus | iOS & macOS development | Scoop.it

nimbus - The iOS framework whose growth is bounded by O(documentation).

No comment yet.
Scoop.it!

Camera+ APIs

Camera+ APIs | iOS & macOS development | Scoop.it

With several million users around the world, Camera+ is one of the most popular apps ever. And now you can integrate Camera+ functionality right into your apps and web services with our comprehensive APIs. It’s the perfect way to reach our ever-growing user base.

No comment yet.
Scoop.it!

Xcode 4.x tip – how to get a separate working debugger window

Xcode 4.x tip – how to get a separate working debugger window | iOS & macOS development | Scoop.it
Just figured this out today after trying once before.  If you have a multi-monitor setup like I do you may like to have the console & debugger be in a separate window.
No comment yet.
Scoop.it!

ytoolkit

ytoolkit | iOS & macOS development | Scoop.it

ytoolkit - YToolkit includes a base64 lib, a handy cocoa categories lib, and an oauth 1.0 & 2.0 lib

No comment yet.
Scoop.it!

nib2objc

nib2objc | iOS & macOS development | Scoop.it

nib2objc - Set of tools and utilities (command line, GUI, Mac Service) to transform NIB files for the iPhone into Objective-C code files

No comment yet.
Scoop.it!

OpenEars: a library for voice recognition for iPhone

OpenEars is an shared-source iOS framework for implementing round-trip English language speech recognition and text-to-speech on the iPhone and iPad, which uses the CMU Pocketsphinx, CMU Flite, and CMUCLMTK libraries.


Highly-accurate large-vocabulary recognition (that is, trying to recognize any word the user speaks out of many thousands of known words) is not yet a reality for local in-app processing on the iPhone given the hardware limitations of the platform; even Siri does its large-vocabulary recognition on the server side.


However, Pocketsphinx is capable of local recognition on the iPhone of vocabularies with hundreds of words depending on the environment and other factors, and performs very well with command-and-control language models.

No comment yet.
Scoop.it!

iOS Flip Transform

iOS Flip Transform | iOS & macOS development | Scoop.it

Core animation framework for navigating data by flipping.


Supports 3 interaction modes - triggered, auto and controlled, and 3 content types - blank, image or text.

No comment yet.
Scoop.it!

PhFacebook

PhFacebook | iOS & macOS development | Scoop.it

PhFacebook is an embeddable MacOSX framework to easily access Facebook's API.


  • Uses Facebook's new 'graph' API internally, handles OAuth in a WebView for you and returns JSON strings.
  • Comes with a sample application to show you how to use it.
  • Supports extended permissions.
  • Localized in English and French.
No comment yet.
Scoop.it!

AGImagePickerController | Objective-C | iPhone | UIKit

AGImagePickerController | Objective-C | iPhone | UIKit | iOS & macOS development | Scoop.it

AGImagePickerController is a image picker controller that allows you to select multiple photos and can be used for all iOS devices.

No comment yet.
Scoop.it!

iOS Code: MKiCloudSync – Sync your NSUserDefaults to iCloud with a single line of code

iOS Code: MKiCloudSync – Sync your NSUserDefaults to iCloud with a single line of code | iOS & macOS development | Scoop.it

Just wrote this class, MKiCloudSync (100 lines of code) that auto syncs your NSUserDefaults to iCloud.


How to use?
All you need to do is to enable iCloud key value store entitlements, copy the files and forget about the rest.

No comment yet.
Scoop.it!

iOS Framework: Introducing MKNetworkKit

How awesome would it be if a networking framework automatically takes care of caching responses for you?


How awesome would it be if a networking framework automatically remembers your operations when your client is offline?


You favorite a tweet or mark a feed as read when you are offline and the Networking Framework performs all these operations when the device comes back online, all with no extra coding effort from you.


Introducing MKNetworkKit.

No comment yet.
Scoop.it!

SSToolkit

SSToolkit | iOS & macOS development | Scoop.it

SSToolkit is a collection of well-documented iOS classes for making life easier by solving common problems all iOS developers face. Some really handy classes are SSCollectionView, SSGradientView, SSSwitch, and many more.

No comment yet.
Scoop.it!

Singleton snippet for Xcode 4

Singleton snippet for Xcode 4 | iOS & macOS development | Scoop.it
The snippet configuration for a singleton class method mentioned in my previous post called sharedInstance.
No comment yet.
Scoop.it!

RestKit

RestKit is an Objective-C framework for iOS that aims to make interacting with RESTful web services simple, fast and fun. It combines a clean, simple HTTP request/response API with a powerful object mapping system that reduces the amount of code you need to write to get stuff done.

No comment yet.
Scoop.it!

Xcode 4.x tip: option key directs open action to Assistant editor + direct open

Xcode 4.x tip: option key directs open action to Assistant editor + direct open | iOS & macOS development | Scoop.it

This just came up on twitter so I thought I’d mention it with a few more characters available: holding down the option key whilst performing an action that will open/show a view in the editor will put that view into the Assistant editor.

No comment yet.
Scoop.it!

Aviary iOS SDK

Aviary iOS SDK | iOS & macOS development | Scoop.it

iPhone and iPad image editor component

No comment yet.
Scoop.it!

Augmented Reality (Vuforia) - Qualcomm Developer Network

Augmented Reality (Vuforia) - Qualcomm Developer Network | iOS & macOS development | Scoop.it

Vuforia brings a new dimension to mobile experiences through the use of augmented reality. Vuforia provides industry-leading technology and performance on a wide range of mobile devices. Vuforia's computer vision functionality will recognize a variety of 2D and 3D visual targets. With support for iOS, Android, and Unity 3D, Vuforia will allow you to write a single native app that can reach over 400 models of smartphones and tablets.

No comment yet.
Scoop.it!

CLAnimation

CLAnimation | iOS & macOS development | Scoop.it

CLAnimation - a cocos2d-like animation API based on CAAnimation of UIView

No comment yet.
Scoop.it!

PDF Reader/Viewer for iOS

PDF Reader/Viewer for iOS | iOS & macOS development | Scoop.it

I've crafted this open source PDF reader/viewer for fellow iOS developers struggling with wrangling PDF files onto iOS device screens. Version 2.x is a complete rethink and rewrite of the original 1.x code. Please see my contact info below if you find
any bugs or have questions about the code.


The code is universal and does not require any XIBs (as all UI elements are code generated, allowing for greatest flexibility). It runs on iPad, iPhone and iPod touch with iOS 4.0 and up. Also supported are the Retina displays on iPhone 4 and iPod touch 4th generation and is ready to be fully internationalized. The idea was to provide a complete project template that you could start building from, or, just pull the required files into an existing project to enable PDF reading/viewing in your app(s).

No comment yet.
Scoop.it!

iOS Button Image Generator

iOS Button Image Generator | iOS & macOS development | Scoop.it

Programmatic button image generation (with caching) and button title customization for iOS applications.

No comment yet.
Scoop.it!

SFBAudioEngine

SFBAudioEngine | iOS & macOS development | Scoop.it

SFBAudioEngine - A powerful C++ audio playback engine for Mac OS X and iOS

No comment yet.