iOS and Cocoa goo...
Follow
Find
147.5K views | +299 today
Scooped by jerometonnelier
onto iOS and Cocoa goodies
Scoop.it!

40 Secrets to Making Money with In-App Purchases | Ray Wenderlich

40 Secrets to Making Money with In-App Purchases | Ray Wenderlich | iOS and Cocoa goodies | Scoop.it
Learn 40 battle-proven secrets that will help you earn more money with in-app purchases in your apps!
more...
No comment yet.
Anything related to iOS development, goodies, repositories, UI and tutorials
Your new post is loading...
Scooped by jerometonnelier
Scoop.it!

Open Source Library Providing A Core Data Query Language For Swift

I've mentioned a number of libraries for working with Core Data, the most popular of which being Magical Record. Here's an open source Swift based library providing a very nice syntax for querying ...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source Swift Library Allowing You To Create Complex Auto Layout Layouts from Code

Previously I mentioned the FLKLAutoLayout that allows you to easily create complex auto layouts from code. Here's an auto layout helper library created in Swift from Robert Böhnke inspired by FLKAu...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Recreating Skype's Action Sheet Animation · Arkadiusz Holko

Recreating Skype's Action Sheet Animation · Arkadiusz Holko | iOS and Cocoa goodies | Scoop.it
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

• Singletons in Swift In this post, I will to...

• Singletons in Swift In this post, I will to... | iOS and Cocoa goodies | Scoop.it
Singletons in Swift



In this post, I will to demonstrate one particular way of creating singletons in Swift. But, before starting, let me just say: Swift is a very powerful programming language that allows developers to construct the same functionality in multiple ways. Therefore, the following example is just one way of building a singleton in Swift.



Generally, I discourage the use of singletons, as instantiating an object that will last forever is not good design. Instead, I prefer letting ARC do the memory management and letting ARC decide when to release an object or keep it alive. Additionally, there’s always an alternative way to build what you are trying to do with a singleton.




Nonetheless, despite my recommendations, I will demonstrate a way of building a singleton or a shared object in Swift, just in case you absolutely need one.



Let’s suppose that you need a shared instance of a class Monitor to continuously monitor the status of a running algorithm in your application. The Monitor class will be a subclass of NSObject and you want to instantiate this class only once. Here’s how to build this class in Swift:



import Foundation
class Monitor : NSObject {

class func sharedMonitor() -> Monitor {
return _sharedMonitor
}

}
var _sharedMonitor: Monitor = { Monitor() }()




In the above source code, first, I imported the Foundation module to be able to subclass NSObject. Then, I created a class Monitor subclassing NSObject. The class contains a class function sharedMonitor. This function doesn’t take any input arguments and returns a class type Monitor. The _sharedMonitor variable is defined as a global variable and I initialized it to a closure that simply instantiated the Monitor class.



But, how can you use it? Well, suppose you need to reference this singleton from another object. You can write:



let monitor = Monitor.sharedMonitor()




Now, let’s build a small example. Using Xcode 6 (currently in beta), create a Single View Application and name the project Singleton. Choose Swift as the programming language and save the project wherever you like. Then, add a new class to the project. Choose iOS -> Source -> Cocoa Touch Class. Name the class Monitor and make it a subclass of NSObject. Choose Swift as the language and save the class.



Next, open the Monitor.swift file and modify it as I previously described:



import Foundation

class Monitor: NSObject {

class func sharedMonitor() -> Monitor {
return _sharedMonitor
}

}
var _sharedMonitor : Monitor = { Monitor() }()




Then, open the ViewController.swift file and in the -viewDidLoad method create two constants of type Monitor and check that they are identical:



let monitor1 = Monitor.sharedMonitor()
let monitor2 = Monitor.sharedMonitor()

if monitor1 === monitor2 {
println(
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source Component For A Customizable Keyboard Text Suggestion Bar With Morphing Animations

Previously I've mentioned a few libraries allowing you to enhance the iOS keyboard with a suggestion bar, most recently JustType that adds a suggestion bar and a number of other enhancements, and A...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Introducing the raywenderlich.com Swift Style Guide | Ray Wenderlich

Introducing the raywenderlich.com Swift Style Guide | Ray Wenderlich | iOS and Cocoa goodies | Scoop.it
Check out the first draft of our official Swift style guide - and submit your comments!
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Component For Buttons With A Neat Ripple Animation On Press

A couple of months ago I mentioned a nice open source library allowing you to create round and square buttons that have a nice 3d animation effect when pressed. Here's an open source component allo...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Component For Creating Great Looking Custom Alert Views Made With Swift

Open Source iOS Component For Creating Great Looking Custom Alert Views Made With Swift | iOS and Cocoa goodies | Scoop.it
I've mentioned a number of custom iOS alert view components, most recently AMSmoothAlert which features a clean style and nice popping animations. Here's an open source component created with Swift...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Example: Recreating The Twitter App Startup Transition In Swift With Core Animation

Yesterday I mentioned a component allowing you to easily replicate the animated view bending effect as seen in the Skype app. Here's another project created to show how to replicate the effect of a...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

PureLayout for iOS - Cocoa Controls

PureLayout for iOS - Cocoa Controls | iOS and Cocoa goodies | Scoop.it

The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. PureLayout extends UIView/NSView, NSArray, and NSLayoutConstraint with a comprehensive Auto Layout API that is modeled after Apple's own frameworks.

Writing Auto Layout code from scratch isn't easy. PureLayout provides a fully capable and developer-friendly interface for Auto Layout. It is designed for clarity and simplicity, and takes inspiration from the Auto Layout UI options available in Interface Builder while delivering far more flexibility. The API is also highly efficient, as it adds only a thin layer of third party code and is engineered for maximum performance.

more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Tool: A Command Line Documentation Generator For Swift

Last week I mentioned a nice library for working with JSON in Swift as using the JSON parsing API's in the iOS SDK can become tedious. Documentation generation in Swift is another issue to be tackl...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

SwiftToolbox

SwiftToolbox | iOS and Cocoa goodies | Scoop.it
Swift toolbox is a community-supported catalog 
of iOS and OSX libraries written in the 
Swift Programming Language.
jerometonnelier's insight:

as seen in http://www.scoop.it/t/ios-and-mobile-development

more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

A Custom UIStoryboardSegue Allowing You To Present Modal Views With A Custom Blurring Effect

Previously I've mentioned a nice tutorial on creating custom UIStoryboardSegue's. Here's an open source component providing a custom UIStoryBoardSegue that allows you to easily set up modal views w...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Tutorial: How To Use The JSONModel Library For Easily Handling JSON Data

Tutorial: How To Use The JSONModel Library For Easily Handling JSON Data | iOS and Cocoa goodies | Scoop.it
Previously I mentioned the excellent JSONModel library providing a number of nice features working with JSON data most notably that makes it easy to convert JSON data to Objective-C objects. Here's...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Library Allowing You To Easily Create Real-Time Asynchronous Blurring Effects

Since iOS 7 brought blurring effects into the forefront we've mentioned a number of libraries for creating blurring effects most recently ANBlurredImageView allowing you to apply an animated tintab...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Component For Creating Draggable Card Style Alert Views

Late last year I mentioned a nice library for creating custom alert views that are styled similar to the native iOS alert views, but adding in nice features such as support for images, and extra bu...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source Library For Easy and Clean Asynchronous Flow Control In Swift

About a year and a half ago I mentioned a library for asynchronous flow control in Objetive-C called Sequencer. Sequencer definitely helps to make your asynchronous code more readable and clean. He...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Tutorial: Creating A Candy Crush Style Game In Swift With Sprite Kit

Tutorial: Creating A Candy Crush Style Game In Swift With Sprite Kit | iOS and Cocoa goodies | Scoop.it
Apple has done an excellent job with the documenting the Swift programming language and I've been asked a couple of times about tutorials and so far by the best are on Apple's own Swift Progra...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Library For Easily Creating Local Notifications At Specific Time Intervals

Last month I mentioned a nice open source library allowing you to automatically present users with notes after updates. Here's another library that provides a nice way to communicate with users all...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Facebook Pop Tech Talk Video | Ray Wenderlich

Watch a tech talk video on Facebook Pop with tech editor Ryan Nystrom and developers from Facebook!
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

An Open Source Pre-Permissions Framework With Support For iOS 8 Permission APIs

Earlier this year I mentioned the concept of pre-permissions (asking the user for access permission before really asking them for permission) to increase user authorizations, and mentioned the Clus...
more...
No comment yet.
Rescooped by jerometonnelier from iOS Development: Tools and Tips
Scoop.it!

JSONModel - Magical Data Modelling Framework for JSON on iOS and OSX!

JSONModel - Magical Data Modelling Framework for JSON on iOS and OSX! | iOS and Cocoa goodies | Scoop.it

Objective-C and swift framework for creating rapidly powerful JSON model classes.


Via Scott Davis
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

How To Use SQLite to Manage Data in iOS Apps

How To Use SQLite to Manage Data in iOS Apps | iOS and Cocoa goodies | Scoop.it
In this tutorial, we'll cover how to use SQLite database in iOS app. To give you a basic idea of SQLite, we'll build a sample iOS app together.
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

Open Source iOS Component Providing A UIView Subclass That Automatically Bends On Position Changes

A couple of months ago I mentioned an interesting library allowing you to easily create animated mesh transform effects on a view which among other effects allowed you to create some interesting be...
more...
No comment yet.
Scooped by jerometonnelier
Scoop.it!

NSDate-Extension for iOS - Cocoa Controls

NSDate-Extension for iOS - Cocoa Controls | iOS and Cocoa goodies | Scoop.it

Use NSDate-Extension to handle NSDate objects easily.

more...
No comment yet.