Treat Warnings as Errors
It’s good to keep things clean from the start, whether you are running a simple test, writing a large scale enterprise app or building anything in between. With that in mind, I highly recommend you always configure project settings so the compiler treats warnings as errors – in other words, a warning will result in the same output as an error, no executable created.
To configure Xcode to treat warnings as errors, head over to the Build Settings:
Continue reading this post »
iOS Open Source : Animate UILabel Properties
Adam Siton is the author of AUIAnimatedText, a drop in UILabel replacement, which allows animation of the following properties:
- textColor
- text
- font
- fontSize
The screenshot below shows the options available in the demo application that is included with the project. I would show a more interesting series of images, however, it’s difficult to get a full appreciation of animation effects through a two-dimensional figure. Check out the demo, it’s the best way to test drive the project.
SupaSounds – Royalty Free Music for Your Apps
I’d like to introduce SupaSounds, a new sponsor of iOS Developer Tips.
Specifically targeting mobile application developers, SupaSounds offers hundreds of royalty free music tracks, with plans in place for regular updates and additions. These sounds are ideal for game developers and at the same time a great addition for any developer looking for that little extra touch to make an app standout in the crowd.
Most sound tracks are 30 seconds or longer and are optimized for continuous looping. All tracks can be previewed on the site and can be viewed by either music genre or game type. SupaSounds also offers a “U.I. Sound Kit” for common interface tasks such as mouse clicks, dialog alerts, popups, etc.
Continue reading this post »
iOS Open Source : GMGridView
Gulam Moledina is the developer of GMGridView, a very nice UI control for managing a grid of views. You can move grids, use pinch, rotate and pan gestures, and create both vertical and horizontal layouts.
The screenshot below shows a two column vertical grid. Item 96 is shown in a different color as this is a cell that can be moved, which was initiated by a long tap on the same.
Creating .ipa File for Ad Hoc Distribution in Xcode 4
If you’ve ever tried to provide an Ad Hoc build to a tester using a Windows machine, you know the frustration involved with sending a .app file. Reason being, this file type is an “application bundle” which is a conglomeration of files and directories packaged as a single file. Windows doesn’t know how to deal with this file, which typically results in a frustrating app install process.
The answer is to create a .ipa file. There is a means to do this using iTunes, however, the process is somewhat of a kludge. With Xcode 4 there is now a direct way to create an .ipa file, without leaving the development environment.
The process is quite straightforward, first make sure the scheme is iOS Device
Continue reading this post »
Instance Variables in the Implementation File
Within Xcode, if you set the compiler option to Apple LLVM compiler 2.1 (or greater), you can move your instance variable declarations from the interface file to the implementation file.
For example, here is a traditional interface definition with instance variables declared:
@interface SandboxViewController : UIViewController <uitextfielddelegate> { UITextField *username; UIButton *testButton; UILabel *label; } @end </uitextfielddelegate>
However, you can now move those same definitions to the implementation file:
Continue reading this post »
iOS Open Source : Popup with Selection List
Created as an alternative to UIActionSheet, LeveyPopListView displays a popup window with a selectable list of options.
This project covers a number of fundamental iOS programming concepts – creating and drawing UIViews; building a UITableView with custom UITableViewCells; animation effects with blocks (done when both showing and hiding the popup).
Below is a screenshot of the popup with a list of selectable options.
Creating Repeating and Non-Repeating Timers
Let do a quick run through of the basic operation of the NSTimer object. Timers are generally divided into one of two buckets, repeating and non-repeating. In either case, a timer event is fired after a specified amount of time has elapsed. As the name implies, once the repeating timer fires, it is rescheduled to fire again at the specified interval – this process is repeated until the timer is invalidated.
Repeating NSTimer
The code below shows how to create a repeating timer, which fires ever 3 seconds. The method updateActivityIndicator will be called on each timer event.
Continue reading this post »
iOS Open Source : Sliding View Controller
ECSlidingViewController is a nice UI control that shows a child view controller by sliding a parent controller aside.
Below are few screenshots to give you an idea how this control works:







