• Swift Tips that Developers should know

    Improve the Readability of ConstantsA neat way to utilize structs in Swift is to make a file for all the constants in our application. This is useful because Swift allows us to nest structures like so:import Foundation struct Constants { struct FoursquareApi { static let BaseUrl = "https://api.foursquare.com/v2/" } structRead more...
  • Choosing The Best Mobile App Development Technology

    There are many different reasons to create an app: maybe you see a need for a business app, maybe you just have a great idea. But regardless of the reason, you still have to start at the beginning. In recent posts, I’ve addressed the most common questions about getting your app off the ground:Should you hire someone or learn how to code on your oRead more...
  • Working with JSON in Swift

    If your app communicates with a web application, information returned from the server is often formatted as JSON. You can use the Foundation framework’s JSONSerialization class to convert JSON into Swift data types like Dictionary, Array, String, Number, and Bool. However, because you can’t be sure of theRead more...
  • Choosing between a native, hybrid, or web app

    There are a few different routes you can take to make your online product ready for mobile devices. The option you choose largely depends on three main factors:The quality of the experience you want your app to have.The complexity of the features you need for your app to work.Your budget.Ready to build your app?We’ll match you with the perfect frRead more...
  • WebView Strategy for Creating Mobile Apps

    Both Android and iPhone (iOS) development are separate beasts. For example, if you create an Android app, you must rewrite it as a port to iPhone. All that hard work x2. It isn’t ideal, but we do what we have to do to work around the limitations imposed on what we can develop.PhoneGap as a shortcut.PhoneGap will try to minimize the amount ofRead more...
  • Factors to Consider When Choosing an App Platform

    But before to embarking on the task of developing apps for any particular platform, numerous factors have to be considered and diligently studied. Sure, Android and iOS have been hogging all the limelight because of their sheer market share, but, BlackBerry and Windows also have their own loyal users.Given the fact that Android and iOS are the mostRead more...
  • Display a popover in Swift

    In swift we have the UIPopoverPresentationController to deal with that need.First you need a ViewController that will be the view of your popover. You can built it in the storyboard or in code.If its in a storyboard you will access it in code with something like that :let storyboard:UIStoryboard=UIStoryboard(name:"Main",bundle:nil)varmenuRead more...
  • How to add a bar button to a navigation bar in Swift

    Available from iOS 2.0Navigation bars are one of the most common user interface components in iOS, so being able to add buttons to them is something you'll do a lot. You can add buttons to the left and right side of a navigation bar, and as of iOS 5.0 you can add more than one to either side.Note: bar button items don't belong to the UINaRead more...
  • Display an Alert View in Swift

     Alert views display an informative alert message to the user. Alert views interrupts the user and requires them to stop what they’re doing to choose an action or dismiss the alert. In this tutorial we will display an alert view when the user clicks a button. We will use Swift as the language of this tutorial, so we need Xcode 6. It canRead more...
  • Tutorial Storyboards in iOS 9

     Storyboards are an exciting feature first introduced way back in iOS 5 that save you a lot of time building user interfaces for your apps.To show you what a storyboard is, I’ll let a picture do the talking. This is the storyboard that you will be building in this tutorial:You may not know exactly yet what the app does but you can clearly seRead more...
  • Display Ads in your Application with Google AdMob

    Displaying Ads in your Application with Google AdMob.In this Google AdMob tutorial, I am going to show you how to display ads in your iOS Applications using the Google SDK for AdMob. A perfect way to make money from apps.I have had a lot of people recently message in to ask about what is happening with iAds. And what alternatives are there out therRead more...
  • Detecting low Power Mode in Swift

    What is low power mode?Low power mode is a new way that apple is tackling their ever dwindling batteries. It stops all background activity, dims the screen and uses different assets to save power. It’s pretty neat to be fair, I have survived on 1% for half an hour before. I know, Sounds like a lie, but trust me. It isn’t.Create Detect Low PowerRead more...
  • Swift NSTimer Tutorial

    What is NSTimer?The NSTimer class can be used to create ‘timer’ objects in your iOS applications. Simply put – a timer. I’m sure you’ve all seen iOS applications that have a similar function to this. Ever wondered how they work? Wondering How NSTimer Works? Well, it works by waiting for a specific interval of time to eRead more...
  • Wifi Transfer between iPad and Computer

    If you are tired of the iTunes restrictions and looking for a high efficiency transfer tools for iPad, this Wireless Transfer App for iPad is your best choice. Normally you will need to connect your iPad to computer via USB cable if you like to transfer photo or video between iPad and computer. But this iPad computer Wifi transfer tool caRead more...
  • Presenting view controllers on detached view controllers is discouraged Warning

    Warning :-Presenting view controllers on detached view controllers is discouragedTo avoid getting the warning in a push navigation, you can directly use : [self.view.window.rootViewController presentViewController:viewController animated:YES completion:nil]; And then in your modal view controller, when everything is finished, you can just call :Read more...
  • WatchKit Tutorial with Swift

    WatchKit is Apple’s new framework and related technologies that allow you to create apps for the Apple Watch, released along with Xcode 6.2.In this WatchKit tutorial, you’ll create your first WatchKit app with Swift. Specifically, you’ll take a Bitcoin price tracking app, and make a Watch app that goes along with it.In the process, you’ll lRead more...
  • BUILDING AN APPLE WATCH APP

     This app will allow the user to swipe between the timezones so they can easily know what time it is anywhere in Canada and the US.This app is built on top of the Tutorial: Today Widget in Swift tutorial, since in that app we also made a timezone view. Since the Today Widget and the Apple Watch apps are very similar because they are Read more...
  • SWIFT UITABLEVIEWCELL SWIPE ACTIONS

    In a new project we wanted to give the user options when they swipe across a table view cell. Most people know that in the Mail app for iOS 8 you can swipe and expose 3 buttons “More” “Flag” and “Archive”. Lets look to see how we can display our own buttons with different colors and titles, then do something when they are tapped.UITABLERead more...
  • UICollectionView in Swift

    The iOS Photos app has a stylish way of displaying photos via a multitude of layouts. You can view your photos in a nice grid view:Or you can view your albums as stacks:You can even transition between the two layouts with a cool pinch gesture. “Wow, I want that in my app!”, you may think.UICollectionView makes adding your own custom layoutRead more...
  • How to Make a Game Like Candy Crush with Swift Tutorial

     Matthijs Hollemans on June 24, 2014Learn to make a tasty match-3 game in the new Swift languageUpdate 4/10/2015: Updated for Xcode 6.3.A little while back, I wrote an Objective-C tutorial about how to make a game like the Candy Crush Saga, which is a very popular casual match-3 game.But I thought it would be great to Read more...
  • Swift Tutorial: A Quick Start

    Swift Tutorial: A Quick StartGet started quickly with this Swift tutorial!Update 12/18/14: Series updated for Xcode 6.1.1.Swift is Apple’s brand new programming language, just released this year at WWDC.Along with the language, Apple released an excellent Swift reference guide that I highly recommend.However, the reference guide is longRead more...
  • How to pass an XCode variable to the HTML file

    You can construct a Javascript string then pass into -stringByEvaluatingJavaScriptFromString as show below. NSInteger u = get_integer_from_user(); NSString* script = [NSString stringWithFormat:@"call_your_function(%d);", u]; [webView stringByEvaluatingJavaScriptFromString:script]; You can do something like [_webView stringByEvaluatingJavaScriptFRead more...
  • Printing multiple pages in Objective-C

    This prints a representation of a page preview called sheet, which is an NSBox - (void)sendToPrinter:(int)code { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; sharedInfo = [NSPrintInfo sharedPrintInfo]; sharedDict = [shaRead more...
  • UIWebView loadRequest

    override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let url = NSURL (string: "http://www.google.com"); let requestObj = NSURLRequest(URL: url!); myWebView.loadRequest(requestObj); self.view.addSubview(myWebView) } Read more...
  • UIWebview Fit Contents in Frame

    - (void)webViewDidFinishLoad:(UIWebView *)webview { CGRect oldBounds = [[self webview] bounds]; //in the document you can use your string ... ans set the height CGFloat height = [[webview stringByEvaluatingJavaScriptFromString:@"document.height"] floatValue]; [webview setBounds:CGRectMake(oldBounds.origin.x, oldBounds.origin.y, olRead more...
  • NSArray

    NSArray is Objective-C’s general-purpose array type. It represents an ordered collection of objects, and it provides a high-level interface for sorting and otherwise manipulating lists of data. Arrays aren’t as efficient at membership checking as sets, but the trade-off is that they reliably record the order of their elements. The basic colleRead more...
  • Swift Tutorial: Optionals and Control Flow

    In this article, we zoom in on control flow in Swift. Before we can discuss control flow in more detail, we need to take a look at a concept that is new to most of you, optionals. Optionals are another safety feature of Swift. At first, it may look like a hassle to use optionals, but you'll quickly learn that optionals will make your code much safeRead more...
  • UIPrint​Interaction​Controller

    With all the different means to comment, mark up, save, and share right at our fingertips, it's easy to overlook the value of a printed sheet of paper.UIKit makes it easy to print straight from a user's device with custom designs that you can adapt to both your content and the paper size. This article will first walk through how to format your contRead more...
  • Buttons & Icons For Your iPhone Apps

      ikonic - 150 vector icons for iOS projects.  Batch - A free suite of 300 icons for web and user interface design. Icons by Adam Whitcroft.  Glyphish - 200+ grayscale icons by Joseph Wain. Free 1x size versions.  iPhone UI Icon Set - a nice set of icons by designer Eddie Wilson. These areRead more...
  • UIAlertView

    Alert views are pop-up views that appear over the current view on the iPhone.Creating and showing an alert (ARC compatible): UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Really reset?" message:@"Do you really want to reset this game?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil]; // optional - add more buttonRead more...
  • Using Xcode for Free Responsive Design Testing on a Mac

    Quick Tip : Using Xcode for Free Responsive Design Testing on a MacAt GRAYBOX almost all projects we’re doing now are responsive designs so that our websites function great on a variety of mobile devices. This means we have a ton of testing devices now in the office including:iPhone 3G (iOS 4) iPhone 4 (iOS 5) iPhone 4S (iOS 6) iPhone 5 (iOS 6) iRead more...
  • Making a PDF from a UIWebView

    While working on a project I needed a way to generate a pdf from some in app html to a for emailing and printing purposes. This seemed like a rather easy task, however the pdf generated was always empty. After digging around the web I kept coming back to this post onStackOverflow. A bit more searching I came across this great post by Brent Nycum whRead more...
  • Getting started with Swift programming language

    Getting started with Swift programming language   Introduction to Swift : Tutorial 1Few days back, in a surprising move Apple introduced a new programming language called  ‘Swift’ to be a new platform for the development of iOS apps.Along with the introduction of Swift the XCode IDE is now upgraded to XCodeRead more...
  • Android spinner example using ArrayAdapter

    Android spinner example using ArrayAdapter and XML resourceAndroid spinner is very much like the HTML<select> tag. It basically displays dropdown list and you can select one from the list. There is no multi select available at this time. In this tutorial we will go thru the following ... Create a spinner from XML resource arrayCreate a sRead more...
  • Implementing Pull-to-Refresh and Handling Empty Table

    In this iOS Programming 101 post, I would like to answer two common questions raised by our readers.I follow your table view tutorial to create my first app. The tutorial is great. It shows us how to display data in the table view. But what if the table is empty? When there is no data, the app should display a friendly message instead of just displRead more...
  • How to Integrate Facebook Login in iOS App

    How to Integrate Facebook Login in iOS AppIntegrating Facebook features into an app is nowadays a quite common task, and one of the most important steps in the integration process is the login functionality implementation. Logging in with Facebook not only allows you to attach a social characteristic into your app, but it can also be used as a logiRead more...
  • A Recipe for writing responsive REST clients on Android

    Android development is easy but making the app resilient is hard.Apps are developed under perfect conditions. Test phones with few applications running on top of them with a reliable network conditions. When the app is handed off to end users, environment change dramatically. People use their apps everywhere and network connection isRead more...
  • Android In App Billing (FlowChart)

    Take a quick look then I’ll try and walk you through the process:Explanation of the symbolsSix symbols are mainly used:This is the symbol for when Google send you a Broadcast that something about the purchase has changed (you catch it in a broadcast reciever):This is showing that you need to store this data (in memory/in a database – its upto yRead more...
  • Android Swipe to Refresh

    I have recently came across this new View in the support library package that allows your app to have built-in support for pull swipe to refresh. This is pretty cool, since we don't have to use any of the libraries out there. Admittedly, very little customization can be done, but then what else can we customize, right?Anyway, heRead more...
  • Android Progress Wheel

    This is a custom component for Android intended for use instead of a progress bar. Download source from https://github.com/Todd-Davies/ProgressWheel/archive/master.zipA complete walkthrough of how to use this component in your appXML:To implement the view in your xml layout do the following:Add the following to your attrs.xml file (in res/valuRead more...
  • Android Camera

    1. Android CameraMost Android devices have at least one camera. Some devices have a front and a back facing camera.Using the camera on the Android device can be done via the integration of existing camera application. In this case you would start the existing Camera application via an intent and use the return data of the applicationRead more...
  • UICollectionView custom layout tutorial

    For a recent project I needed to refactor a primary view within our iPad app, so I decided to learn the ins and outs of UICollectionView (introduced in iOS 6) and I thought it would make for a good tutorial to share. My project ended up needing a custom UICollectionViewLayout which meant I needed to handle more of the layout logic than if I'd used Read more...
  • Building a Text to Speech App Using AVSpeechSynthesizer

    iOS is an operating system with many possibilities, allowing to create from really simple to super-advanced applications. There are times where applications have to be multi-featured, providing elegant solutions that exceed the limits of the common places, and lead to a superb user experience. Also, there are numerous technologies one could exploitRead more...
  • Anatomy of a UICollectionViewController

    Let’s go right to an example of one of these babies in action. The UICollectionViewController family contains several key components, as you can see below:Take a look at these components one-by-one:UICollectionView – the main view in which the content is displayed, similar to a UITableView. Note that it doesn’t necessarily have to take uRead more...
  • UICollectionView Example

    UICollectionView Example with UICollectionViewFlowLayoutI'm waiting for some friends to come into town tonight so I thought I might throw together a very basic UICollectionViewFlowLayout example.It demonstrates proper use of:UICollectionViewFlowLayout properties and basic subclassing.How to properly implement UICollectionViRead more...
  • iOS Core Image filters

    CIImage with applied image effect can be retrieved by accessing outputImage key value. After we create new context in which image will be drawn, we can set this image to our UIImageView.// CIImage on which we apply effect CIImage *inputImage = [[CIImage alloc] initWithImage: [UIImage imageNamed:@"image.png"]]; // CIFilter CIHueAdjust CIFilter Read more...
  • The Status Bar

    The Status Bar (or UIStatusBar) is the 20-pixel-high strip at the top of the window that shows the carrier name and signal strength, network status, current time, and battery strength:DefaultBlack OpaqueBlack TranslucentBlack and white status bars push the underlying views down, giving you 320 x 460 pixels of screen space to work with in your app. Read more...
  • Creating An Image Gallery Like Over – Part 1

    For this tutorial, I will start with a Fresh iOS6 View-Based application that uses Storyboards and ARC. Also note that I will be optimizing for the iPhone 5 resolution.  You are free to make the tweaks necessary to deploy on the iPhone 4 and 4S.Here is a breakdown of what we will cover in this part:Creating a UICoRead more...
  • Developing Split View Apps for iPad

    Getting StartedUsing Xcode, create a Split View-based Application project and name it splitViewBased (see Figure 1).Figure 1. Creating a new Split View-based ApplicationObserve the files created in the Classes and Resources folder (see Figure 2). Notice that there are two View Controller classes (RootViewController and DetailViewController) asRead more...