Search for a substring in a string in Cocoa
To search for a substring in a string in Cocoa, use the following code: #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { @autoreleasepool { NSString *string1 =...
View ArticleCompare objects in Cocoa
Next example shows you how to compare objects in Cocoa. Do not use == for objects comparison, use isEqual method, or method variation. Next example shows how to compare two strings in Objective C:...
View ArticleDefining a Class in Objective C
To define a class in Objective C you place the @interface part in .h file and the @implementation part in .m file. Example 1. Class definition in Objective C To define class MyNotes use the following...
View ArticleiPhone navigation bar plus table view application howto
We’re going to create a simple application for the iPhone using a navigation bar and a table view. This application will be able to move between 2 screens using a navigation bar. The first view will...
View ArticleMulti view iPhone application – tab views and navigation bar
The basic of iPhone application development starts with multi view, so in this tutorial we will learn to create a multi view iPhone app. We will create a simple app which will contain 2 tabs. The first...
View ArticleDisplay your iPhone Application in Landscape
A short tutorial about how to Display your iPhone Application in Landscape is presented here. Let’s say you want to run your iPhone application in Landscape mode. How you do that? Well, it’s really...
View ArticleCapture Image, Video and Crop
In this tutorial we will access the device’s default camera application, the photo library and we will record a video with PhoneGap. Also at the end we will do a basic crop on a selected image from...
View ArticleFind out details about an image with ImageMagick utility
We can find out details about an image using identify tool from ImageMagick package, available on multiple OSes: identify -verbose img1.bmp
View ArticleFix SDL2 Crash When Compiling using Xcode on Mac OSX
If you want your SDL2 app to compile without crashing you must sign it. In order to do that let’s go to SDL2.framework directory: cd /Applications/Xcode.app/Contents/Developer/Platforms/...
View Article