As an iOS Developer it seems I come across a common situation where I want to add a content view with the same width as the screen inside a scroll view. Since most apps need to have responsive layouts, this usually makes sense to do using Autolayout. At first when learning about scrollviews, they seemed like magic. Due to their slightly different rules they were also a bit frustrating.
In ruby on rails, which is an open source web framework, there exists a nice system of libraries called “Gems” that can be easily imported into a web project and just used. These gems also have a versioning system, that allows the developer to pick a specific version for the project, or more importantly keep the version consistant so the project doesn’t break because of a future change. Cocoapods gives the iOS developer this same kind of power. With cocoapods you can not only take advantage of thousands of open source libraries, but you can also make your own pods to keep track of several versions of libraries you make yourself. Currently, Apple doesn’t have a good versioning system solution. The community responded with Cocoapods, and today we’re gonna explain what a cocoapod is an how to make your own.
In part one of this series we talked about the heap, the stack, object ownership, and how reference counting works. In this article we’re going to expand on this to include the role of properties and how all of this works in ARC (Automatic Reference Counting).
Not too long ago I came under the painful realization that I had been hacking my way through iOS apps without fully understanding how Memory Management works in Objective-C. Up to this point my memory management tactic was waiting for the compiler to complain and then take the suggestion the compiler provided. If that failed, Stack Overflow to the rescue! While this usually fixed the problem and works fine on small applications, it probably isn’t the best tactic when working with apps of a larger scope where performance is a big issue. So hopefully with this article I can help clarify things for you so you’re not left stuttering stupidly in an interview when they ask “What’s the difference between the stack and heap?” or “How does reference counting work?”.
Many times with app development there will be a need to store quite a bit of relational information within your app. This could be any data, for example what if you needed to store data about an managers and their employees. Core Data is the perfect solution to these types of problems. In this recipe, We’ll walk you through setting up an application that utilizes core data.
As a developer you quickly find out that many of the more useful apps require a web backend of some sort. This presents a problem for developers looking to build something without wanting to create a website and a RESTful API service to support their app. There are a number of platforms that seek to solve this problem, but the one I’ve been playing with lately is Parse. Parse so far has impressed me for a number of reasons, but mainly because it’s free for quite a few requests and really easy to use. This tutorial will walk you through getting started with parse and demonstrate some of the nifty features.
iOS Programming Recipe 16.2: Populating A UITableView With Data From The Web – iOS 7 and AFNetworking 2.0
This article will be nearly the same as Recipe 16, except that it will cover AFNetworking 2.0 and iOS 7 instead.
- You have a grasp on Xcode basics. If not go get some education here.
- I also recommend reading the other two tutorials on creating table view as I’ll be building on some of the concepts in those tutorials: Recipe 11 Part 1 & Recipe 11 Part 2
Hooray! Apple NDA is over on iOS 7. Which means, this is the very first iOS 7 post at NSCookbook. For the first recipe on iOS 7 we’re gonna talk about UIKit Dynamics a bit. For those of you that don’t know what it is. One word, Awesome! Dynamics is a new framework that lets you give physics inspired animation to views.
The view controllers of your application coordinate between your data and what is actually displayed on screen. In a well written MVC application the view controllers will be where much of your essential app logic lives and in turn where you will spend a lot of time. UIKit supplies many built-in view controllers and view controllers of view controllers such as UITabBarController or UINavigationController. With these you can accomplish an amazing amount of tasks, but sometimes you need or want something a bit more custom! This article will discuss a few helpful techniques for developing and working with custom view controllers.
Last time we left off in our block discussion I had gone over some of the basics of blocks. How to implement them, call them, and gave a bit of insight on why they are cool. Now, there is one really big benefit to using blocks and that is Grand Central Dispatch. There are of course many other neat things you can do with blocks and we’ll briefly cover a few of those too.
- You Have already looked at Recipe 25: Implementing Blocks Part I.
So What Is Grand Central Dispatch?
Today, I’ll use wikipedia as my crutch:
Grand Central Dispatch (GCD) is a technology developed by Apple Inc. to optimize application support for systems with multi-core processors and other symmetric multiprocessing systems.
Ok this doesn’t tell us a whole bunch, but what it does tell us is that it is a technology developed for multi-core processors. All you need to know is GCD is a set of tools that Apple has provided that allow us to perform blocks serially or concurrently on various queues (which map to either the main thread or another GCD managed thread). We also have the option of doing this either synchronously or asynchronously.