In this tutorial, I will show you how to create a simple, multi-player game using the Multipeer Connectivity framework that was introduced in iOS 7. In the first installment of this series, we laid the foundation of the game. In this article, we’ll implement the game logic.
As with every major release, iOS 7 includes many new APIs that developers can take advantage of in their applications. In this tutorial, we’ll take a look at a brand new framework introduced in iOS 7, the Multipeer Connectivity framework. This framework adds support for discovering, connecting to, and communicating with nearby services, such as iOS devices. In this tutorial, I will show you how to create a simple, multi-player game using this new framework.
A wide range new APIs have been introduced in iOS 7, giving developers new possibilities and opportunities. The framework that’s drawn my attention is the Multipeer Connectivity framework. It offers a number of neat features that I’d like to demonstrate in this tutorial.
Xcode 5 is a major step forward for the Apple ecosystem, bringing more possibilities, features, and tools to developers than ever before. With Version 5, Xcode has grown into an extremely powerful IDE. Read this article to learn what’s new!
This tutorial will teach you all about the latest multitasking enhancements provided by the iOS 7 SDK. Specifically, you’ll learn about the Background Fetch, Remote Notifications, and Background Transfer Service APIs. Read on!
Welcome to the third and last part of this session, where we’ve created some useful custom views. We’ve implemented a custom text input view, a custom accordion menu, and now we’re going to build a simple custom alert view. Read on!
The custom Alert View is going to be an alternative, simple, and nice alert view that will serve our need to display simple messages to the user. It will mainly consist of the following parts.
- A label upon which the message will appear.
- A toolbar below the label.
- An okay button on the right side of the toolbar.
- A cancel button on the left side of the toolbar.
The above will reside together into a UIView, and the view will be contained into the main view of the view controller that we’ll build for the purpose of this custom alert view.
The main view of the view controller is going to be semi-transparent, which will prevent users from tapping on anything else in the background while the alert view is up.
Furthermore, the alert view will slide in from the top side of the screen when it’s about to appear, and it’ll slide out with the reverse move when it’s about to go offscreen. It’ll contain two buttons, an okay button and a cancel button. They can be visible or not depending on the needs of the message about to appear.
This tutorial will teach you how to create a custom Accordion Menu. This animated menu will allow you to collect input from the user in an engaging and streamlined fashion. Read on to learn more!
The accordion menu’s initial position will be at the center of the target view it appears on. When the menu appears, half of it will move towards the top of the target view, while the other half will move towards the bottom of the view, expanding to its full allowed height. During use, both the Y origin point and the height are going to be modified so that the desired effect can take place. The menu itself will consist of a tableview. It will provide us with great flexibility regarding the number of options added to the menu. The tableview is going to exist as a subview on a view and will appear on a target view. The main view of the accordion menu’s view controller will work as a cover to the subviews existing at the back, so the user is unable to tap on anything else except for our menu options.
Developing an amazing application is not a simple job. Traditionally, one of the most difficult aspects of doing so has been creating rich, compelling interfaces. This tutorial will teach you how to build a custom text input view that will help make your own apps shine!
This tutorial is the first in a collection on building custom interface elements. In this tutorial, we will cover customized text input views, and in the next two tutorials we will go over custom accordion menus and alert views. The series format is as follows:
- Creating a Custom Text Input View
- Creating a Custom Accordion Menu
- Creating a Custom Alert View
In this tutorial we are going to create a simple list application, which will incorporate some basic features. In this example, our app will only be able to add and edit items using our brand new custom text input view. The final project of this tutorial is going to be the base for the next one, where we are going to create an accordion menu to provide the user with some options. In the third and last tutorial, we will use the final project of the second tutorial to create a custom alert view.
Multi-tasking prevents apps from freezing. In most programming languages, achieving this is a bit tricky, but the NSOperationQueue class in iOS makes it easy!
This tutorial will demonstrate how to use the NSOperationQueue class. An NSOperationQueue object is a queue that handles objects of the NSOperation class type. An NSOperation object, simply phrased, represents a single task, including both the data and the code related to the task. The NSOperationQueue handles and manages the execution of all the NSOperation objects (the tasks) that have been added to it. The execution takes place with the main thread of the application. When an NSOperation object is added to the queue it is executed immediately and it does not leave the queue until it is finished. A task can be cancelled, but it is not removed from the queue until it is finished. The NSOperation class is an abstract one so it cannot be used directly in the program. Instead, there are two provided subclasses, the NSInvocationOperation class and the NSBlockOperation class. I’ll use the first one in this tutorial.
Here’s the goal for this tutorial: for each extra thread we want our application to create an NSInvocationOperation (NSOperation) object. We’ll add each object into the NSOperationQueue and then we’re finished. The queue takes charge of everything and the app works without freezing. To demonstrate clearly the use of the classes I mentioned above, we will create a (simple) sample project in which, apart from the main thread of the app, we will have two more threads running along with it.