• About Me

Bloggle with Harish

~ The Next Thing

Bloggle with Harish

Category Archives: iPhone

The iOS Design Guidelines

07 Tuesday Jul 2015

Posted by Young Brain @ Work in iPhone

≈ Leave a comment

Design great-looking apps for Apple iOS devices. – Credit: http://iosdesign.ivomynttinen.com/

Designing iOS apps can be difficult sometimes, but finding correct and up-to-date information about all of Apples’ devices shouldn’t be. These design guidelines will help any designer who’s building neat things for iOS get started within seconds.

About these guidelines

These guidelines describe how to design apps that follow the official HIG for iOS by Apple, not what you can do with custom controls. Sometimes it makes sense to break the rules. The purpose of this document is to guide you, not to provide solutions for complex and unique design problems.

This unofficial documentation will be updated and extended regularly. Last update: November 11, 2014.

Resolutions and Display Specifications

Device Retina Portrait (px) Landscape (px)
iPhone 6+ Retina HD 1080 x 1920 1920 x1080
iPhone 6 Retina 750 x 1334 1334 x 750
iPhone 55, 5S, 5C Retina 640 x 1136 1136 x 640
iPhone 44, 4S Retina 640 x 960 960 x 640
iPhone1st, 2nd & 3rd Generation No 320 x 480 480 x 320
iPad Air / Retina iPad1st & 2nd Generation / 3rd & 4th No 1536 x 2048 2048 x 1536
iPad Mini2nd & 3rd Generation Retina 1536 x 2048 2048 x 1536
iPadMini, 1st & 2nd Generation No 768 x 1024 1024 x 768

Difference between Points and Pixels

Pixels are the smallest physical element that we can control on a digital display. The more pixels can be fitted into a specific screen size, the higher the PPI (pixels-per-inch), and the clearer the rendered content becomes.

Points are a resolution-independent measurement. Depending on the screens pixel density, a point can contain multiple pixels (e.g., 1 pt contains 2 x 2 pixels on a regular retina display).

When you are designing for various display types, you should think in points, but design in pixels. This means you will still need to export all your assets in 3 different resolutions, no matter in which resolution you are designing your app.

NOTE

As long as it is not stated otherwise (by appending „px“ to a value), this guide always refers to points when it comes to specific dimensions. If you need the value in pixels, just multiply by 2 for Retina screens or by 3 for Retina HD screens.

Device Asset Resolution PPI Display Size
iPhone 6+ @3x 401 5.5″
iPhone 6 @2x 326 4.7″
iPhone 55, 5S, 5C @2x 326 4.0″
iPhone 44, 4S @2x 326 3.5″
iPhone1st, 2nd & 3rd Generation @1x 163 3.5″
iPad Air / Retina iPad1st & 2nd Generation/ 3rd & 4th @2x 264 9.7″
iPad Mini2nd & 3rd Generation @2x 326 7.9″
iPad Mini1st Generation @1x 163 7.9″
iPad1st & 2nd Generation @1x 132 9.7″

Downsampling on iPhone 6+

Rendered pixels and physical pixels are equal on all iOS devices, with one exception: the Retina HD screen of the iPhone 6 Plus. Because its screen has a lower pixel resolution than what would be a natural @3x resolution, the rendered content is automatically resized to approximately 87% of the original size (from 2208 x 1242 pixels to fit the display resolution of 1920 x 1080 pixels).

Difference between iPhone 5S 6 6+ displaysThe difference between displays of iPhone 5S, 6 and 6+. More in-depth information here.

App Icons

Device App Icon AppStore Icon Spotlight Settings
iPhone 6+ 180×180 px 1024×1024 px 120×120 px 87×87 px
iPhone6, 5S, 5, 5C, 4S, 4 120×120 px 1024×1024 px 80×80 px 58×58 px
Old iPhones1st, 2nd, 3rd Generation 57×57 px 1024×1024 px 29×29 px 29×29 px
Retina iPadsMini 2 & 3, Air, 3 & 4 152×152 px 1024×1024 px 80×80 px 58×58 px
Old iPads1, 2, Mini 1 76×76 px 1024×1024 px 40×40 px 29×29 px

Automatically applied effects

App icons assets are generally added to the application package as plain, squared PNG files in various dimensions. When rendered on a device, iOS applies various effects to app icons.

ROUNDED CORNERS

The old simple radii values for rounded corners are gone. Since iOS 7, app icons have been using the shape of a superellipse. Since Apple did not release an official template of the shape, you will have to use one of the unofficial templates out there that replicate the shape in more or less accurate ways.

iOS 8 app icon radius shape

The rounded corners should not be included in the final exported assets, but you might need them in your design process if you want to add effects, such as a stroke or shadows, that are aligned to the corner of the icon.

WARNING

If you are masking your icon asset with the superellipse shape because you want to apply effects aligned to the corners, make sure not to use any transparency for the area outside the mask. Transparency is not supported at all for app icons and instead is rendered as plain black. If your mask is not 100% accurate, users will see small black fragments on the rounded edges. It’s recommend to set the background of the canvas to be the same as the app icon background.

BORDER STROKE (IN SOME SITUATIONS)

If the app icon you are using has a white background, a 1 pixel gray border stroke will be applied to make it easier to recognize the edges of the icon. This is only done in the settings app (if your application is listed there) and the AppStore.

LEGACY EFFECTS (IOS 6 AND PREVIOUS VERSIONS)

On older iOS versions, these effects are applied automatically: rounded corners (not the same shape as iOS 7+ icons are using), drop shadows on the home screen and a gloss effect that can be disabled.

Grid system

iOS 8 app icon grid system

Apple developed a golden ratio grid system that can be used to size and align elements on your icon correctly. Nevertheless, even Apple designers are not following the grid system very strictly with the native apps’ icons. Feel free to break the rules if your icon simply works better without aligning all elements strictly to the grid.

Typography

The default system font on all iOS versions is Helvetica Neue. Since iOS 7, Apple has been using a slightly modified version of the font, but using the original Helvetica Neue for your design process is totally fine. In addition to the default font, many alternative font faces are available to use. You can find a complete list of pre-installed typefaces here.

Custom Fonts

Technically, any True Type Font (.ttf) can be used within an iOS app, but be careful about licenses. It should be safe to use fonts that are completely free for commercial usage. App licenses for commercial fonts are rarely available, and if they are, securing them can turn out to be somewhat expensive. MyFonts currently offers the biggest collection of fonts that can be licensed for mobile app usage.

Color Palette

iOS 8 default colors

Since iOS 7, Apple has been using a vibrant color palette for the interface of the OS and pre-installed apps. While you can use the default iOS color palette listed above, you can also (and probably should, if you want to stand out) use your own colors.

Iconography

In iOS apps, icons have always been a great way to support text labels with a visual relationship to the performed action or to replace text completely (often for very common actions such as „New“, „Delete“, etc.). Usually, we are dealing with icons that are part of the Navigation Bar, Tool Bar or Tab Bar.

Bar Button Icons

Icons used in bars should always have two different states: the default state in outlined style with a stroke width of 1 or 1.5pt and the active state with a solid color fill.

iOS button bar outline and solid icons

You should never include any additional effects such as a drop-shadow or inner shadows on button icons because these are relicts from previous iOS versions (before the iOS 7 redesign). Button icons should be drawn in one solid color on a transparent background—the shape of the icon is used as a mask, and the color will be applied programmatically.

Activity View Icons

Icons in the Activity View (also known as Share Popover) used to be designed in outline style, but since iOS 8, Apple has reverted back to solid fill icons on a plain white background.

iOS activity sheet icons

Commonly used design elements

iOS offers a great collection of ready-to-use views and controls that allow app developers to quickly build interfaces. Some elements can be customized to a certain level, but other cannot and probably also should not be. When designing an application for iOS, you should know your set of tools and stick to them whenever possible. However, in some cases, it might be worthwhile to build a custom control because you need a more custom look or want to change the functionality of an already existing control (danger zone). Almost anything is possible,and sometimes it makes sense to break the rules, but always think twice before doing so.

Status Bar

The Status Bar contains basic system information such as the current carrier, time, battery status and more. It’s visually connected to the Navigation Bar and makes use of the same background fill. To match the style of your app and guarantee readability, the content of the status bar comes in two different styles: dark (black) and light (white).

iOS Status Bar

It is possible to hide the Status Bar, but think twice before doing so. For example, users might be interested in knowing if they are connected to a WiFi network when the app regularly downloads web content or if Bluetooth is enabled when the app requires a Bluetooth link to third-party hardware. A valid reason to hide the Status Bar is when you want to remove all distractions from a single element, for example, when displaying full screen content such as an image gallery.

Navigation Bar

The navigation bar contains the controls for navigating through the applications views and optionally to manage the content of the current view. It will always appear at the top of the screen, right below the status bar. By default, the background is slightly translucent and blurs content underneath the bar. The background fill of the bar can be set to a solid color, a gradient or a custom bitmap-pattern.

iOS Navigation Bar

Navigation Bar on iPhone 6 in portrait mode.

iOS Navigation Bar Landscape

Navigation Bar on iPhone 4S in landscape mode. The height of the bar is reduced by 12pt, except on iPads. It’s also a common practice to hide the status bar in landscape mode.

The elements should always following a specific alignment pattern.

  • Back button should always be aligned to the left side.
  • Title of the current view should always be centered in the bar.
  • Action buttons should always be aligned to the right side. If possible, there should never be more than one primary action to avoid missed clicks and to maintain simplicity.

Toolbar

A toolbar contains a set of actions for managing or manipulating the content of the current view. On the iPhone, it will always appear aligned at the bottom edge of the screen, while on the iPad, it can also be displayed aligned at the top of the screen.

Similarly to the navigation bar, the background fill of toolbars can be modified, is translucent and blurs the underlaying content by default.

iOS Toolbar

Toolbars should be used when a specific view requires more than three primary actions that would hardly fit or would look messy in the navigation bar.

Search Bar

Search bars come in two different styles by default: prominent and minimal. Both versions do have the same functionality.

  • As long as no text was entered by the user, a placeholder text is shown inside the bar, and, optionally, a bookmarks icon that can be used to access recent or saved searches.
  • Once a search term is entered, the placeholder disappears, and a clear button to delete the entered value appears on the right edge.

Search bars can make use of a prompt — a short sentence to introduce the functionality in the context of the search. For example, „Enter a city, zip code or airport.“

iOS prominent search bar

Prominent search bar style, without and with a prompt.

iOS minimal search bar

Minimal search bar style.

To provide even more control over a search query, it is possible to chain the search Bar with a scope bar. The scope bar will use the same style as the search bar and might be useful when there are clearly defined categories for the search results. For example, in a music app, the search results could be filtered again by interpreters, albums or songs.

Tab Bar

The tab bar is used to allow the user to quickly navigate through the separate views of an application, and it should only be used for this purpose. It always appears at the bottom edge of the screen. By default, its slightly translucent and uses the same system blur for underlaying content as the navigation bar.

iOS Tab Bar

A tab bar can only contain a fixed maximum number of tabs. Once there are more tabs than the maximum count, the last tab displayed will be replaced by a „More-tab“ that will lead to a list of hidden tabs, with an option to re-order the displayed tabs.

While the maximum amount of tabs displayed is five on iPhones, it’s possible to display up to seven tabs on the iPad while avoiding a more-tab.

To notify users about new information on a view, it sometimes makes sense to apply a badge count to a tab bar button. If a view is temporarily disabled, the related tab button should not be completely hidden; instead, it should be faded out to visually communicate the disabled state.

Table View

Table views are used to display small to large amounts of list style information in a single or multiple columns and with the option to divide several rows into separate sections or to group them.

There are two basic table view types that should be used, depending on the type of data you are presenting.

PLAIN

iOS plain table view

A plain table contains a number of rows that can have a header on the top and a footer after the last row. It’s possible to display a vertical navigation on the right edge of the screen to navigate through the table, which makes sense when presenting a big data set that could be sorted in some way (e.g., alphabetically descending).

GROUPED

iOS grouped table view

A grouped table allows you to organize rows in groups. Each group can have a header (best used to describe the context for the group) as well as a footer (good for help text, etc.). A grouped table needs to contain at least one group, and each group needs to contain at least one row.

For both table view types, a few styles are available to present the data in a way that allows users to easily scan, read and probably modify it.

DEFAULT

iOS default table view

A table row in default style has an optional image aligned on the left and a title.

WITH SUBTITLE

iOS subtitle table view

The subtitle table style enables a small subtitle text underneath the row title. It is useful for further explanations or short descriptions.

WITH VALUE

iOS subtitle table view

The value table style allows you to display a specific value that is related to the row title. Similar to the default style, each row can have an image and a title that are both aligned to the left. The title is followed by the right aligned label for the value, which is usually displayed in a slightly more subtle text color than the title.

Modals, Popovers and Alerts

iOS provides various styles of temporary views that can be used to display, edit and manipulate data in a way that fits best in a given situation. While each temporary view exists for a very specific purpose and each one looks different, all temporary views still have one thing in common: When displayed, it’s the highest index layer on the current view (they appear on top of everything else), and content underneath is overlayed by a translucent black background.

ACTIVITY VIEW

An activity view is used to perform specific tasks. These tasks can be default system tasks such as share content via the available options, or they can be completely custom actions. When designing icons for custom task buttons, you should follow the same guidelines as for the active state of bar button icons — solid fill, no effects, on a transparent background.

iOS activity sheet view

ACTIONS

Action Sheets are used to perform one single action from a list of available actions and to force the user of an app to confirm an action or cancel it.

iOS action sheet view

In portrait mode (and on small landscape screen resolutions), actions are always displayed as a list of buttons sliding in and staying at the bottom edge of the screen. In this case, an action sheet should always have a cancel button to close the view and not perform any of the listed actions.

When there is enough space available (e.g., on iPad screens), action sheets visually transform into popovers. A button to close the view is not required anymore because tapping a target anywhere outside the popover will close it automatically.

ALERTS

The purpose of alerts is to inform the user about critical information and optionally to force the user to make a decision about some action.

An alert view does always contain a title text, which should not be longer than one line and one (for pure informational alerts, e.g., „OK“) or two (for alerts that require a decision, e.g., „Send“ and „Cancel“) buttons.

iOS Alerts

Also, you can add a message text, if needed, as well as up to two text input fields, one of which can be a masked input field, which is appropriate for sensitive information like passwords or PINs.

EDIT MENU

iOS minimal search bar

The Edit Menu allows users to perform actions such as Copy, Paste, Cut, etc., when an element is selected (text, images, others). While it is possible to control which operations the user can choose from, the visual appearance of edit menus is set and not configurable unless you build your own completely custom edit menu.

POPOVER

Popovers are useful when a specific action requires multiple user inputs before proceeding. A good example is adding an item, which has a few attributes that need to be set before the item can be created.

In a horizontal environment, popovers reveal underneath the related control (such as a button) with an arrow pointing to that control while opened. The background of a popover uses a slightly reduced opacity and blurs the content underneath, just as many other UI elements have done since iOS 7.

iOS popover view

A popover is a powerful temporary view that can contain various objects such as its own navigation bar, table views, maps or web views. When a popover grows in size due to the number of contained elements and reaches the bottom edge of the viewport, it is possible to scroll within the popover.

MODALS

Modals are a useful view for tasks that require multiple commands or inputs by the user. They appear on top of everything else, and, while open, block interaction with any other interactive elements underneath.

The typical modal usually provides:

  • a title to describe the task;
  • a button to close the modal without saving or performing any other actions;
  • a button to save or submit any entered information; and
  • various elements for user input in the modal body.

There are three different modal styles available:

  1. Full screen: covers the entire screen.
  2. Page sheet: In portrait mode, the modal covers the underlaying content only partially, leaving a small portion of the parent view visible underneath the translucent black background. In landscape mode, the page sheet modal acts just like a full screen modal.
  3. Form sheet: In portrait mode, the modal appears in the center of the screen, keeping the surrounding content of the parent view visible underneath the translucent black background. The position of the modal adjusts automatically when a keyboard needs to be displayed. In landscape mode, the page sheet modal acts just like a full screen modal.

Controls

iOS provides a wide range of controls for basically any required input type you can think of. Listed below you will find the most important (commonly used), but for a full list of the available controls, you should look at the iOS Developer Library.

BUTTONS

Probably the most used control overall is the good old button. Since iOS 7, the default button design hasn’t really looked like a button anymore, but rather more like a plain text link. The button control is highly customizable and allows you to style everything from text style, drop shadows and color to an icon that is either prepended or centered if there is no text label, as well as fully custom backgrounds.

Keep in mind that a button can have several states, which should be communicated with visual language: default, highlighted, selected and disabled.

PICKERS

Pickers are used to select one value from a list of available values. The web equivalent would be a select box (which the picker control is also used for when touching a select in Safari). An extended version of picker is the datepicker, which allows the user to scroll through a list of dates and times and select values for (configurable) day, month and time.

iOS picker controls

Left: datepicker displayed inside a table view, right: picker as keyboard.

Except for the background color, it is not possible to change the visual style or size (same as keyboard) of a picker control. Most often, they appear at the bottom of the screens, where keyboards appear as well, but it is possible to use them in other positions.

SEGMENT CONTROLS

A segment control contains a set of segments (at least two) that can be used for things like filtering content or to create tabs for clearly categorized content types.

iOS segment controls

Segment control without and with icons.

Each segment can contain a text label or an image (icon), but never both. In addition, using a mixed set of segment types (text and images) in one segment control is not really recommended. The width of one segment changes automatically based on the number of segments (two segments: 50% of total control width, 5 segments: 20% of total control width).

SLIDERS

The slider control allows the user to choose one specific value from a range of allowed values. Since choosing a value works pretty smoothly and without any steps, sliders are recommended for selecting an estimated, but not exact, value. For example, a slider would be a good control for setting the sound volume, since the user can hear the difference and can see the difference between loud and very loud, but a text input to set an exact dB value would be impractical.

iOS slider controls

Slider control without and with descriptive icons.

It is possible to set icons for the minimum and the maximum value, which are displayed on the start and end edge of the slider control, thereby allowing you to visually embrace the purpose of the slider.

STEPPER

Steppers should be used when the user should enter an exact value from a limited range of possible values (e.g., 1-10). A stepper always contains two segmented buttons, one for lowering and one for raising the current value.

iOS stepper controls

Visually, the stepper control is highly customizable:

  • you can use your own icons for stepper buttons;
  • when maintaining the native iOS look, you can customize the color of borders, background and icons by using a tint color, which automatically sets the color for each of these elements; and
  • if you want to go further, you can use completely custom background images for the stepper buttons as well as for the separator.

SWITCH

iOS switch controls

A switch allows the user to quickly toggle between two possible states: on and off. It’s the checkbox for iOS apps. It is possible to customize the color for the on and off states, but the appearance of the toggle button and size of the switch are set and cannot be changed.

KEYBOARDS

There are various keyboard types available to provide the best possible keyboard for a specific text input. While it is possible to build your own completely custom keyboard, default keyboards cannot be customized in style or size.

Further Reading and Resources

These guidelines only provide basic information to get you started with iOS design. Once you dig deeper, you might be interested in more details. These articles and resources should help you.

GENERAL

  • iOS Human Interface Guidelinesby Apple
  • UIKit User Interface Catalogby Apple
  • My app design workflowby Marc Edwards
  • Learn Mobile App Designon Treehouse

ANIMATIONS & PROTOTYPING

  • Framer.js$79.99, trial available
  • MarvelFree Prototyping for Everyone
  • PixatePrototype iOS animations
  • OrigamiQuartz composer framework by Facebook
  • How To Prototype In Xcode Using Storyboardby Meng To

DEVELOPMENT STARTER GUIDES

  • Building iOS Apps From Scratchby Mike Rundle
  • Cocoa ControlsOpen Source, Commercial

BAR BUTTON ICONS

  • 1042 iOS Line Iconson Creative Market – $45
  • 2080 iOS 8 Iconson Creative Market – $69
  • 1640 iOS Icons – Streamlineon Creative Market – $69
  • 500 Line Vector Iconson Creative Market – $11

APP ICONS

  • App Icon TemplatePhotoshop
  • iOS App Icon TemplateSketch

UI KITS

  • iPhone GUI for Sketch (iOS 7)Sketch
  • iOS 7 GUI PSD (iPhone)Photoshop
  • iPad GUI for Sketch (iOS 7)Sketch
  • iPad GUI PSDPhotoshop
  • iOS 8 UI Kit + for SketchSketch
  • BlueprintSketch

Using PhoneGap for Hybrid App Development

15 Sunday Sep 2013

Posted by Young Brain @ Work in Android, iPhone

≈ Leave a comment

Most businesses today want mobile apps for iOS and Android. They don’t care too much about the other popular mobile platforms because these two giants let them reach nine out of ten users.

However, when you are building an enterprise mobile app for a company that has implemented BYOD and needs to support BlackBerry and Windows mobile devices too, you are forced to develop four separate apps. Or, when an app achieves universal popularity, most app owners want to make sure that they dominate the same category on all mobile platforms.

Having flirted with website and web app development before hitching my cart to the mobile app development bandwagon, I felt that I should give a shot to cross-platform mobile development. When I started out, my web development skills were a little rusty while I was pretty good at iOS app development and average at Android app development. I chose PhoneGap because it supports a large number of development platforms: iOS, Android, BlackBerry, Windows, Symbian, and even Tizen.

Another reason for choosing PhoneGap was that it is a native WebView component with HTML5-CSS3 application and it has a structured API that uses JavaScript to access native functionalities of mobile devices. This means that an app you build on PhoneGap can access native functions from the devices as well as the mobile operating system. Theoretically, you can build high-performance apps on PhoneGap and make them work on several mobile platforms.

Beginning PhoneGap Development 

As with most other cross-platform mobile development apps, PhoneGap apps use HTML5 and CSS3 for rendering, while JavaScript is used for logic. This means that I had to wake up the dormant web developer within me.

Once I was up to speed on HTML5, JS and CSS3, I had to learn how PhoneGap worked. I spent a lot of time reading and skimming through the documentation, app building and GitHub pages for PhoneGap.

Most web developers don’t realize that you need to put in a lot of effort to understand how PhoneGap works. But you won’t lack for resources and sound advice from the community while you’re at it. While developing my first app (for iOS, Android and Windows), I ran into many problems. Some of them arose from my rusty skills, but I felt few had a lot to do with the nature of cross-platform development.

These are the most common problems that an app built on PhoneGap can run into:

  1. Mobile apps with numerous graphic elements or animations may slow things down on some mobile devices and make the app browsing experience a little choppy. Even with general apps there is a noticeable lag as most mobile phones are not fast enough to run hybrid apps. Android, especially, with its numerous versions of OS and devices, is a bigger nightmare than usual.
  2. The app cannot take the benefit of ALL the features of a phone. And trying to use device features requires a lot of hard work. Also, if you want to build an app for the latest version of any operating system, you need to wait for the PhoneGap update. It is bound to stay one step behind native platforms.
  3. The code you write runs everywhere – but you also need to do some coding and tweaking specific to different mobile platforms. This is pretty time consuming. Also, for newbies, fixing (and even identifying) errors can be a huge headache.
  4. I did not enjoy building and deploying on PhoneGap as I have to wait for PhoneGap to finish building. It can take from 2 to 20 minutes – if you’re impatient, this is a problem. Otherwise, it is not much of an issue.

While these are pretty common problems, there are solutions to most of them. And if you become an expert at PhoneGap development, there are many obvious advantages:

  1. You write one code, tweak it a little for all operating systems, and you have apps for 2-6 mobile platforms.
  2. If you have a background in web development and are good with JavaScript, PhoneGap’s learning curve is not too steep.
  3. PhoneGap is better than most other platforms that offer multi-platform development capability as it enables expert developers to support native features and functionality in the app.
  4. There is no dearth of tools – there are several places where you can find quick solutions to your problems and there are several JavaScript libraries that will make your work easier.

Should a native app developer try hybrid app development with PhoneGap?

I, personally, did not have a very good experience with PhoneGap (although I have an app with PhoneGap that works okay on three mobile platforms) as my web development skills needed some work. So, it took too much time to develop, debug, submit and re-submit the app for approval. But as the demand for apps that run across mobile platforms increases, it is important to build expertise in development with a multi-platform app development technology.

Do you know your way around HTML5, JavaScript and CSS3? If yes, PhoneGap presents a great opportunity for using those skills to create mobile apps.

If you are already into native app development, you know Java or Objective-C; those skills will also be needed.

You first foray in PhoneGap app development is bound to be a little deflating (as it is difficult to get good results without delving deep in the technology), but it can help you cut down the time and effort for development once you get better at it.

However, if you are not that much into HTML5 and JavaScript, there is no point in trying your hands at hybrid app development – native app development is going to be around for a long while yet.

iPhone Programming Guide

22 Wednesday Feb 2012

Posted by Young Brain @ Work in iPhone

≈ Leave a comment

Here it is a an document from Apple on iPhone programming guidelines and architecture to be followed:

https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/iphoneappprogrammingguide.pdf

Any iPhone app example you get hold of will use MVC design! MVC is so cruical to iPhone development.

Here are a few examples of how the Cocoa touch framework uses MVC:

  • UIViewController and subclasses (Controllers)
  • UIView/UIResponder/UIControl and subclasses (Views)
  • NSString/NSArray/NSDictionary/Core Data (Model)

Apple iPad 3 Features And Release Date

22 Wednesday Feb 2012

Posted by Young Brain @ Work in iPhone

≈ 3 Comments

The Apple iPad is one of the best-selling tablets in the world, and the iPad 3 is one of the most anticipated devices from Apple this year. This article explains you about the new features that are to be included in the iPad 3.

In a nutshell, the Apple iPad3 will feature a new, thinner and sleeker design, down nearly 20 percent in size compared to the iPad 2. It will also support full touchscreen HD display with a screen resolution of 2048 x 1536.

Apart from that, the iPad 3 will have a lighter battery, reducing the weight of the tablet. However, the battery is reported to cost 20 to 30 percent more than the current iPad’s battery, and will also have a longer battery life.

It is also expected that the iPad 3 will have a wireless charging technology, which will be able to charge the battery and transfer data wirelessly.

iPad 3 Features

iPad 3 FeaturesLet’s now take a look at all the features in depth:

 

A6 ProcessoriPad 3

The current Apple iPad 2 has a 900MHz dual-core ARM Cortext-A9 processor, Apple A5 chipset and PowerVr SGX543MP2 GPU. This certainly made the Apple iPad 2 a powerful tablet and a main competitor in the world of tablets. Now Apple is aiming to make the competition tougher by sporting an A6 Quad-core Processor in the iPad 3. This would make the iPad 3 as powerful as any high-end desktop.

According to Linley Group senior analyst Kevin Krewell, “We expect the A6 will be a quad-core ARM Cortex-A9 design, which would be competitive with next year’s best mobile processors. In 2012, Nvidia will offer a quad-core Cortex-A9 processor, and Qualcomm will have the aforementioned MSM8960, a dual-core A15-class processor operating at 1.7GHz. Fabricating Apple’s A6 in 28nm (instead of the 40nm process Nvidia is using for its quad-core part) will reduce both die cost and power, yielding a much better product.”

iOS 5

The iPad 3 will come with the latest iOS 5, which will host the multi-touch gesture technology. However, analyst and tech enthusiasts predict that Apple would introduce OS X Lion for the tablet, since it will be powered by a quad-core processor.

This will also include multitasking features, such as notifications, task-finishing, app-switching, location and background sound.

3D Feature and New Retina DisplayiPad3

Apple enthusiast expected the Retina Display feature on Apple iPad 2; however, Apple has been working majorly for an improved version of it to include it in the iPad 3. The iPhone 4 currently supports the Retina Display with a screen resolution of 960 x 640. Apple explains Retina Display as: “Developing pixels a mere 78 micrometers wide, Apple engineers were able to pack four times the number of pixels into the same 3.5-inch (diagonal) screen found on earlier iPhone models. The resulting pixel density of iPhone 4 – 326 pixels per inch – makes text and graphics look smooth and continuous at any size.”

With the Retina Display feature, the screen resolution of the iPad3 will be 2048 x 1536 pixels. However, it is said that the third version of the tablet is delayed due to Retina Display issues, and Apple is expected to ship the tablet in early 2012.

There are speculations that the tablet will display the 3D view. Although it’s too early to expect features like 3D display, devices like the LG Optimus can record videos in 3D, and output the same through HDMI.

iPad 3 Features Continued:

Cloud Computing

Apple announced its Cloud services during the WWDC 2011, and will definitely include the iCloud technology both in the iPhone 5 and iPad 3. With iCloud users can store photos, apps, calendars and access songs on iTunes without having them to store in the phone’s memory.

Camera

The iPad 3 will come with an improved camera, since the previous version of the table didn’t seem impressive enough. Unlike the iPad 2, the new tablet will come with LED flash to support the camera. It is expected to have a 5MP camera with 1080p or 720p video recording quality of 60 frames per second. The technology made by OmniVision will help reduce the size of the table by 20 percent.

Fingerprint Proof

Apple has already been granted patents on this technology, and is working real hard to make the iPad3 fingerprint proof. The touch screen will be coated with oleophobic materials, which will reduce the oil and fingerprints on the screen.

Apple iPad 3 Release Date

There isn’t any official word from Apple on when the iPad 3 will be released; however, rumors indicate that it will be announced sometime early next year. Reports state the trial production is likely to start this October. One of the major reasons why the launch of the device has delayed is due to the Retina Display technology. It is also said that it could be delayed because of legal issues with one of Apple’s main supplier, Samsung.

The price and availability of the iPad 3 is still unknown. Please make sure that you keep visiting this page to stay updated.

Apple iPad 3 Price

Though the tablet promises quite a lot of new and exciting features, rumors indicate that it could be priced at a very high range. However, with the competition kicking in, I expect that the iPad 3 will be set at a reasonable price. Nevertheless, are you going to buy the new iPad 3? And what other iPad 3 features are you expecting? Let us know by adding your views below. it is also important to mention that Apple is expected to release the iPhone 5 a few months after the launch of the iPad 3.

 

 

 

What is New in iOS 5 SDK

22 Wednesday Feb 2012

Posted by Young Brain @ Work in iPhone

≈ 1 Comment

iCloud Storage

  • iCloud Storage APIs store documents and key/value data in Apple iCloud
    • iCloud document storage API: Store user documents in an iCloud account
    • iCloud key-value data storage API: Store application meta-data in iCloud. For example, users can resume a video from where it left off from another devices
  • iCloud pushes changes to all user’s devices wirelessly automatically
  • iCloud backups documents automatically
  • Search documents in the iCloue

iOS Automatic Reference Counting

  • Automatic Reference Counting (ARC) for Objective-C removes the programmer requirement to manage memory manually with retain and release
  • No need to call retain, release, autorelease anymore

Storyboards

  • Use storyboards in Xcode to create a page workflow for views
  • An alternative to NIB with additional features to control flows between views
    • NIB defines one view controller at a time
    • Storyboard captures the view controllers and the transitions between view controllers

Newsstand

  • Publish magazines and newspapers directly to the Newsstand in the Home Screen
  • Initiate background downloads of new magazine and newspaper issues when new content is added

Others

  • AirPlay
    • Mirror video, audio, photo on iPad 2 to an HDTV via Apple TV
    • Present application content on a nearby Apple TV
  • Notification Center
    • Display and manage application notifications without interrupting users
  • Twitter Integration
    • Send and compose Twitter requests
  • Core image
    • Access to hardware accelerated framework to enhance photos and videos
    • Use the built-in filters to touch up, correcting photos etc …
    • Adjust image without destroying the original image data
  • Game Center
    • Enable turn-based games. Game center manages user notification when his/her turn of playing is coming up
  • OpenGL ES
    • New capability in developing games with latest OpenGL ES 2 features
  • iMessage
    • iMessage provides messaging service between iOS 5 users over Wi-Fi and 3G
  • New Instruments
    • New instruments including time profiler with CPU strategy, system trace, network activity and network connections instruments.
  • PC Free
    • More features that works without connecting to a computer first
  • Location Simulation
    • Simulate your device location during development and testing
  • Account framework
    • Single sign on for some user accounts
  • Data protection
    • Data/document encryption feature
  • Security
    • Service API to configure and manage SSL sessions, ciphers and certificates
  • Address Book
    • Support of digital business card (vCard) and the association of a user’s social network account
  • Assest Library
    • More features in manage/access photos and albums
  • Core Audio
    • New mixer capabilities
  • Core Data
    • Integration with iCloud storage
    • Store data with encryption (by default)
    • Multiple concurrency options
  • Core Graphics
    • New path creation feature
  • Core location
    • Forward and reverse geocoding location lookup
  • Event Kit
    • New capabilities in managing calendar
  • Map kit
    • Rotate the map according to device heading
  • Media Player
  • Play from iTune University
  • Instrument
    • new feature in system trace and network instrument
  • UI Automation
    • Script editor to capture UI actions
  • Xcode
    • Integrated with Interface Builder
  • Document Support
    • A UIDocument class to manage user documents data

The New APIs for iOS 4

22 Wednesday Feb 2012

Posted by Young Brain @ Work in iPhone

≈ Leave a comment

iOS 4

The new iOS 4 has created a new buzz in the market by providing all that has been much criticized about the previous versions of it. It is now capable of multi tasking and there are enhanced feature list which will make a power house of performance and will give you a much enhanced user experience.

There are a number of APIs that have been added here in this new version. APIs are basically provisions that will allow you to further customize your applications according to your needs without having to download a new app from the stores. There are a number of them available with this version where you can find all that you need in your daily operations.

Lets have a look at them one by one

Calendars Access

This will let you further customize your calendar app where you can directly edit, add and create events within the calendar app. You can create events that are recurring, set end and start times of the events and that too without having to but any thing new.

In-App SMS

This will allow composing all your SMSs from within the application. It is very much similar to the one provided in the version 3.0.

Photo Library Access

Get direct access to all the photos and videos that you have stored in the phone with the use of Media Library APIs

Video playback & Capture

Find new options of handling videos on your mobile. This new API gives you a never before control over how you play the videos or capture them from your phone through AV foundation network.

Map Kit Improvements

Find your way in a new way. Now the maps will be capable of identifying the regions on their own and you will be able to draw routes with annotations for directions which can also be customized and will have other functionalities as well.

Quick Look

This new API will let you have quick preview of the applications without having to get into it and then realizing what exactly it is. This allows for a quicker function and will save time when you are busy.

HTC EVO 4G Will Cut Defection to iPhone 4 Says Sprint CFO

03 Saturday Jul 2010

Posted by Young Brain @ Work in iPhone

≈ Leave a comment

Well Apple has unveiled their new iPhone 4 handset which is due release quite soon, and what usually happens when a new iPhone hits is many defect from their current carrier to grab the latest Apple device from its exclusive carrier AT&T.According to an article over on Cnet by Marguerite Reardon, during an investor conference on Wednesday, Sprint’s chief financial officer, Robert Brust said, “Every year all U.S. carriers, except AT&T, go through a little trauma called ‘iPhone introduction. We have a little churn issue called ‘People leaving to go to the iPhone.’ As people’s contracts expire they leave and go to AT&T for the iPhone.”However, Brust went on to add that he is “hopeful” that the HTC EVO 4G will stem some of those traditional losses, saying, “Our hope is that we won’t lose as many customers this year as we have in the past.”Brust also stated that the Big Blue’s network problems along with their new tiered pricing plan may just give some potential iPhone 4 customers pause. Dan Hesse, Sprint CEO remarked “AT&T has been getting a lot of flack for its network. People all over the country have been complaining about the service. And they’ve raised rates for some of their customers. I think they are under a lot of stress right now.”Last time round, Sprint tried to cut defection to the new iPhone by introducing the Palm Pre and although the device did well in its first few days, sales were nowhere close to the iPhone. However, this time round, Burst believes that the HTC EVO 4G is a much more compelling device than the Palm Pre.The HTC EVO 4G is a phone that people can get instead of the iPhone 4, and last year we were in the distance but now we are catching up, said Burst

iPhone 4G Defects Cause Worldwide Complaints – This is Your Biggest Chance to Own a Free iPhone

03 Saturday Jul 2010

Posted by Young Brain @ Work in iPhone

≈ 1 Comment

The most eagerly anticipated product launch of 2010 was met with a couple of iPhone 4G defects, but this development can work to your advantage, as several free iPhone 4G Test & Own offers are being re-promoted to help identify these bugs and defects. Want to own a unit for free? Read on and find out how.

Okay, so the Apple iPhone 4G was finally released last June 23, 2010. Instead of satisfied owners, however, cities were filled with purchasers who noticed one humongous flaw with the new mobile phone: signal disappears when you hold it in your palm.

What makes matters worse is Apple’s rather nonchalant reply, which eventually became a PR disaster: “you’re holding it the wrong way.”

What the heck, right? Are you supposed to hold the cellphone with 2 fingers? Every single second?

Additionally, there have been numerous reports that some units have yellow discoloration on their screens. Experts say that this problem was expected, as the iMac 27″, the first one to implement the Retina Display that is being introduced to mobile phones courtesy of the newest Apple mobile phone, has the same defect in many of the units sold.

So, the eagerly anticipated launch turned out to be a bust, but it is nothing to be worried about as an emergency firmware update is sure to fix the mentioned defects. The system’s signal reception, after all, can be manipulated by the firmware as the 4G model shares the same physical engineering (albeit sleeker than previous entries) as earlier iPhone units.

But how can these iPhone 4G defects lead to an amazing opportunity for you to own a free iPhone 4G unit?

Well, are you familiar with the free iPhone 4G offers all over the web? The legitimate ones, at least?

These offers are initiated by companies which have great interest on the success of Apple’s newest flagship product. They may be suppliers for Apple, third party developers, prospective advertisers, business partners, and the likes. Regardless of who they are, they want to ensure that the newest version of the product line succeed, and they need your help.

Now more than ever, apparently.

Prior to the newest model’s release, these companies gave away thousands of units for volunteers to test. These volunteers were supposed to report bugs and defects they found with their iPhones. To compensate these testers, they were allowed to keep the units they tested.

Neat, right?

Were you able to avail of such an offer?

If yes, then congratulations on your brand new free iPhone 4G.

But if you didn’t manage to jump aboard one of these offers, don’t worry. More such free iPhone 4G offers are on the way.

Why?

Because the aforementioned interested companies can’t afford more bugs and defects found on the system they’re heavily investing on.

The new batch of free iPhone 4G offers can be found at http://www.get-free-iphone-4g.info. Just like previous offers, however, spots will be limited, so hurry and sign up as fast as you can!

Article Source: http://EzineArticles.com/?expert=Ty_Gonzales

Creating your first iPhone application…

09 Wednesday Jun 2010

Posted by Young Brain @ Work in iPhone

≈ Leave a comment

An overview about the iPhone SDK

The iPhone SDK was announced officially on March 6, 2008, the first beta release was on July 11, 2008 which demanded a firmware update for all iPhone and iPod users. The SDK continued to develop with time until the Beta3 update to the 2.1 SDK was released on August 8, 2008.

Here is a small timeline.

Date of release SDK Version release iPhone OS Version
March 6, 2008 First beta 1.2b1
March 27, 2008 Beta 2 2.0b2
April 8, 2008 Beta 3 2.0b3
April 23, 2008 Beta 4 2.0b4
May 6, 2008 Beta 5 2.0b5
May 29, 2008 Beta 6 2.0b6
June 9, 2008 Beta 7 2.0b7
June 26, 2008 Beta 8 2.0b8
July 24, 2008 First Beta for OS v2.0 2.1
July 30, 2008 Beta 2 update v2.0 2.1
August 8, 2008 Beta 3 update v2.0 2.1

 

The iPhone SDK package contents

The SDK is broken down to the following:

Cocoa Touch

The Cocoa Touch layer is one of the most important layers in iPhone OS. It comprises the UIKit and Foundation frameworks (UIKit.framework and Foundation.framework), which provide the basic tools and infrastructure you need to implement graphical, event-driven applications in iPhone OS.

It also includes several other frameworks that provide key services for accessing device features, such as the user’s contacts.

This framework is used to implement the core set of features.

  • Application management
  • Graphics and windowing support
  • Event-handling support
  • User interface management
  • Objects representing the standard system views and controls
  • Support for text and web content
  • Accelerometer data
  • The built-in camera (where present)
  • The user’s photo library
  • Device-specific information

 

Media

The graphics and media technologies in iPhone OS are geared toward creating the best multimedia experience available on a mobile device. More importantly, these technologies were designed to make it easy for you to build good-looking and -sounding applications quickly. The high-level frameworks in iPhone OS make it easy to create advanced graphics and animations quickly, while the low-level frameworks provide you with access to the tools you need to do things exactly the way you want.

  • OpenAL
  • Audio mixing and recording
  • Video playback
  • Image file formats
  • Quatrz
  • Core Animation
  • OpenGL ES

 

Core Services

The Core Services layer provides the fundamental system services that all applications use. Even if you do not use these technologies directly, every other technology in the system is built on top of them.

  • Networking
  • Embedded SQLite database
  • GeoLocation
  • Threads

 

OS X Kernel

The Core OS layer encompasses the kernel environment, drivers, and basic interfaces of the operating system. The kernel itself is based on Mach and is responsible for every aspect of the operating system. It manages the virtual memory system, threads, file system, network, and inter-process communication.

The drivers at this layer also provide the interface between the available hardware and the system frameworks that vend hardware features. Access to kernel and drivers is restricted to a limited set of system frameworks and applications. iPhone OS provides a set of interfaces for accessing many low-level features of the operating system.

Your application accesses these features through the LibSystem library. The interfaces are C-based and provide support for the following:

  • Threading (POSIX threads)
  • Networking (BSD sockets)
  • File-system access
  • Standard I/O
  • Bonjour and DNS services
  • Locale information
  • Memory allocation

Develop your first iPhone application:

Things you need before going any further:

  • A “MAC OS X” platform of version 10.5.3 or later. You can get an original MAC box or you can simply get one of the hacked versions of the MAC OS, for more information click here.
  • The iPhone SDK “Software Development Kit” you can get one from the iPhone developer program home page, or simply click here.
  • Xcode, the IDE “Integrated Development Environment” used to develop applications and software for MAC based platforms. Although one of Xcode’s goals is to reduce the time you spend writing code, you still devote a considerable part of your development in the text editor. To that end, the text and source editor provide many features with the aim of making your source-code editing a productive and efficient endeavor. Code folding, code completion, Edit All in Scope, Refactoring, and other features allow you to focus your attention on the right areas and to use your time as efficiently as possible. It’s packed with the iPhone installer, so no need to worry about it.
  • Interface builder, this application lets you design compelling user interfaces graphically. Your work is saved as nib files that your application loads at runtime. This means that you what you design is exactly what users of your application see; you work with the actual controls that iPhone OS places on the users’ screens. It also means that you spend less effort codifying the user-interface–related aspects of your application in source code. It’s also supplied in the SDK package.

 

Other developing applications you may use:

  • Debugger, as you start testing your application, you may need to step through your code to the cause of unexpected behavior. Xcode’s debugging facilities provide the usual debugging features, such as breakpoints, viewing variables, and so forth. But Xcode provides these and other debugging features right in the text editor. That is, you can make a change in your code, add a breakpoint, start your application, and perform most debugging tasks in the same window.
  • Instruments, as you near the end of the development process, you must ensure your application uses the resources of the device on which it’s running as efficiently as possible, so that battery power is not wasted and your application does not gather system resources unnecessarily. “Instruments” shows your application’s resource usage, including memory, CPU, and network, in a graphical timeline that lets you see how your application behaves over time.

The MVC design pattern:

The structure of iPhone applications is based on the Model-View-Controller (MVC) design pattern because it benefits object-oriented programs in several ways. MVC–based programs tend to be more adaptable to changing requirements—in other words, they are more easily extensible than programs that do not use MVC. Furthermore, the objects in these programs tend to be more reusable and their interfaces tend to be better defined.

In the MVC design pattern, the model layer consists of objects that represent the data your application manages. The objects in this layer should be organized in the way that makes the most sense for the data. External interactions with model objects occur through a well-defined set of interfaces, whose job is to ensure the integrity of the underlying data at all times.

The view layer defines the presentation format and appearance of the application. This layer consists of your application’s windows, views, and controls. The views can be standard system views or custom views you create. You configure these views to display the data from your model objects in an appropriate way. In addition, your view objects need to generate notifications in response to events and user interactions with that data.

The controller layer acts as the bridge between the model and view layers. It receives the notifications generated by the view layer and uses them to make the corresponding changes in the data model. Similarly, if the data in the data layer changes for other reasons (perhaps because of some internal computation loop), it notifies an appropriate controller object, which then updates the views.

Developing the iCalculator application:

Here is a fast overview of what we will do:

  • Creating the project.
  • Implementing the Model Object.
  • Implementing the Controller Object.
  • Implementing the View Object by use of the “Interface Builder”.
  • Customizing the app delegate to incorporate the view controller object, and add it to the application window.
  • Connecting the view controller to its view.
  • Finalizing the application and setting its icon.

 

Creating the project

1) Launch Xcode. You can find it in the developer folder > Applications > Xcode.

2) Choose File > New Project.

3) Choose from the iPhone OS templates.

4) Choose Window-Based Application.

5) Name your project “iCalculator”.

Figure 1: New Project.

Figure 2: The iCalculator Project.

Note:

■ iCalculator.app: The application binary, the project’s product. It’s in red because the product hasn’t been built yet.

■ iCalculatorAppDelegate.h, iCalculatorAppDelegate.m: The files that implement the application’s delegate.

■ MainWindow.xib: The nib file that defines the application’s main window. Despite its name, iPhone applications normally have only one window.

Implementing the Model Object

We will create a new class whose instance represents an object of the calculator, follow the following steps:

1) Click on the “Classes” folder.

2) Choose File > New File.

3) Choose Cocoa Touch Classes > NSObject subclass.

4) Name the class “iCalculator”, make sure that creating the header file option is selected.

5) Insert the following Code into iCalculator.h:

Figure 3: iCalculator.h.

6) Insert the following Code into iCalculator

Figure 4: iCalculator.m part I.

Notes for newbies:

1) The “retain” and “release” methods are used mainly in the memory management of iPhone applications, that’s because there isn’t any garbage collection in the iPhone OS.

Thus, memory management is done manually; you can’t simply call “dealloc” to free the resources and references of a certain object, because this object may contain references to other objects that will not be de-allocated, and thus will cause memory leaks, so we use retain which will increment the value of a certain variable for this instantiated object, and release decrements the value, and when it reaches zero, the referenced object is de-allocated.

For more information about this topic, read more about memory management in Objective C++ 2.0.

2) If ( Self = [ super init ] )

What does this mean? This means that init of the parent class “NSObject” function will be called and if self is not equals to null do the following.

Figure 5: iCalculator.m part II.

Figure 6: iCalculator.m part III.

Implementing the controller object:

1) Click on classes.

2) Choose File > New File

3) Choose iPhone OS> Cocoa Touch Classes > UIViewController subclass.

4) Name the class “iCalcViewController”.

5) Modify the iCalcViewController.h header file as the following:

Figure 7: iCalcViewController.h

6) Modify the iCalcViewController.m file as the following:

Figure 8: iCalcViewController.m part I.

Figure 9: iCalcViewController.m part II.

Implementing the View Object

To get users excited about your application, it should have the best user interface possible. Interface Builder allows you to build beautiful, more importantly, useful user interfaces by dragging controls from a library of user-interface elements and laying them out n a view as you want them to appear to the user, your user-interface designs are known nib files. Your application loads these resources at runtime to reconstitute the use interface you designed. This means that you can make substantial changes to the user interface layout (and even some behavior) without having to edit source code. This is the main benefit of the Model-View-Controller paradigm.

1) Expand the “Resources” folder.

2) Double click on “mainWindow.xib” and the interface builder will open.

3) From the interface builder choose File > New file.

4) Choose Cocoa Touch and then press on View.

Figure 10: iPhone OS UI templates.

5) Choose save, name it as “CalcView” and navigate till you reach the location of your project and save it under the “Resources” folder and press ok.

6) Xcode will ask you to update the project to accommodate the new file, confirm this process.

7) Press on the File’s Owner icon.

a. Choose Tools > Inspector.

b. Display the identity pane.

c. In the Class text field enter “iCalcViewController”, note that it will auto-complete.

 

And by this way, we’ve connected between our view object and the controller object.

Figure 11: “calcView”’s Components.

8) Press on the View icon.

a. Choose the Inspector Attribute pane.

b. Customize your view as you desire, here we changed the background’s color to black.

Figure 12: “calcView”’s View designer.

9) Add input and output controls to the view

a. Choose tools > Library.

b. In the organization pane, select Library > Cocoa Touch Plug-in > Inputs & Values.

c. Select the Text Field item and drag it to the View.

Figure 13: Drag and drop components.

d. Resize the text field, by enlarging it, such that it contained by most of the view’s width.

 

Figure 14: resize text field.

e. Display the Inspector Attribute pane.

f. Set the text field text to 0.

g. Set the alignment to right-align.

h. Set the title typeface and size, by setting the focus on the text field in the view > Choose Fonts, set it to bold and size 36.

Figure 15: Set font.

i. Add a rectangular button.

  • Choose “Round Rect Button” from the library and drag and drop.
  • In the inspector size pane, set the button’s width to 64 and height to 70.

Figure 16: Set font.

  • Connect the button’s “Touch Down” event to the “press:” action method of the “iCalcViewController” class.
  • Select the button in the view
  • Display the Inspector Attributes pane.
  • Set the title color to black.
  • Set the button title to 7.
  • Set the font size to 48.

Figure 17: Set button attributes.

j. Create the button grid:

  • Choose the button from the view.
  • Choose Edit > Duplicate.
  • Position the clone beside the original button.

Figure 18: Clone the button.

  • Select both buttons and do exactly as the previous steps.

Figure 19: Clone the two buttons.

  • Select the four buttons and with the same steps we can generate the following view.
  • But by changing the text of each button and making sure that the action event of each button is the “press” method

Figure 20: The final calculator view.

Editing the application delegate:

1) Double click on the iCalculatorAppDelegate.h to modify it, edit it to look like this:

Figure 21: iCalculatorAppDelegate.h.

2) Double click on the iCalculatorAppDelegate.m to modify it, edit it to look like this:

Figure 22: iCalculatorAppDelegate.m.

Connecting the View controller to the View

As mentioned before, we have connected between the view and the controller, but that was an initial connection.

We have to be more precise, for example we have to mention which controls do certain actions, and which preview certain data, so here is what we have to do:

1. In the CalcView.xib window, select the File’s Owner proxy (which represents an instance of the “CalcViewController” class).

2. In the Inspector Connections pane, connect the displayField outlet to the text field in the view.

Figure 23: Connecting the view with the controller.

3. Connect the view outlet to the view.

4. Save the “CalcView.xib” file.

Note: If you pressed on one of the buttons, you will find that their action event handler is already set, as we set it before during designing the view to the “press” function.

Setting the application icon

1. In Interface Builder, take a snapshot of the Calc button grid:

a) Place the pointer at the top-left corner of the grid.

b) Press Shift-Comand-4 and hold down the mouse button.

c) Drag the pointer to the bottom-right corner of the grid and release the mouse button.

Figure 24: Taking a snapshot.

Mac OS X places the snapshot file in your desktop using the name Picture 1.jpg (or a name with a higher number if you’ve captured other snapshots).

2. Rename the snapshot file, icon.jpg.

3. In the Groups & Files list, select Resources.

4. Choose Project > Add to Project.

5. Navigate to your Desktop directory and choose icon.jpg.

6. In the dialog that appears, ensure the copy option is selected, and click Add.

7. In the Groups & Files list, double-click Resources > Info.plist.

8. In the editor window, set the value of the Icon file key to icon.jpg,

Figure 24:Info.plist.

9. Save the Info.plist file.

Running your application

Build your application and run it on your simulator, if you have an iPhone connected to Xcode you can choose to deploy and run on it.

Please not that, you have to have a developer’s certificate from apple to develop for iPhones, which will cost you $99 or $299 a year depending on what kind of certificate you want, for more details click here.

Apple’s iPhone 4 SDK license bans ported Flash, Java, Mono apps

09 Wednesday Jun 2010

Posted by Young Brain @ Work in iPhone

≈ 1 Comment

Apple has updated its iPhone Developer Program License Agreement in the iPhone 4.0 SDK to specifically prohibit the development of apps using “an intermediary translation or compatibility layer or tool,” which would include Adobe’s Flash, Sun’s Java, or Microsoft’s Silverlight/Mono.

Apple has always prohibited the use of outside frameworks, runtimes or plugins in iPhone apps, a measure that has prevented Adobe or others from delivering an app with the ability to run content such as Flash or Java or Silverlight.

This restriction prompted Adobe to attempt to salvage its developers’ existing Flash content by adding a feature to the upcoming Creative Suite 5 that would allow the Flash Professional application to export existing Flash content into a native iPhone application package that could be legitimately sold in the iTunes App Store because it was no longer Flash, and therefore no longer needed any sort of external runtime to play.

However, in iPhone 4, a clause in the developer license that until now only prohibited the use of private APIs (that is, development features that Apple has not completed, documented, and disclosed as being available for public use) has now been expanded to include prohibitions on developing iPhone apps in other languages or in other development environments that are then translated or cross-compiled into native iPhone apps. The clause, section 3.3.3, now reads:

“Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).”

This measure means Flash Professionals won’t be able to develop content using Flash’s ActiveScript and then port this code to iPhone. It also means that developers won’t be able to directly port code written in Microsoft’s C# language to its .NET framework into a translated iPhone app.

The prohibition may also be a roadblock for Appcelerator and its Titanium SDK or the similar PhoneGap, both of which are designed to build native mobile apps using web technologies such as HTML and JavaScript. The clause specifically limits JavaScript for use in web apps, and does not allow it to link against the native Cocoa Touch APIs.

The news should come as a crushing blow to Adobe, which has been working furiously to develop its Flash to iPhone cross compiler as the key new feature for Flash Professional in CS5. It also erases Adobe’s strategy to push mobile and web development toward Flash while still leveraging compatibility with the iPhone OS.

By insisting that all iPhone apps begin as native development using its own Xcode tools, Apple can prevent third party middleware platforms from muscling into the market it created. This will effectively reserve the value and sales volumes of the App Store to benefit Apple’s own development tools, ensuring that all the apps sold in the App Store are being built using the company’s own native tools and not just cross-compiled from another source.

Apple’s move apparently comes in a defense strike against Flash app shovelware, which threatens to water down the original content in the App Store with lots of existing, poor quality Flash games originally designed for the web or other mobile platforms and rebaked to work on the iPhone.

The new rule also rubs out any hope for Java or Silverlight/Mono as a common denominator for building mobile apps, preventing developers from coding apps using Java or C#/.NET and then just cross-compiling them into iPhone apps using a “translation or compatibility layer.”

← Older posts

Pages

  • About Me

Recent Posts

  • TOP 10 MOBILE APPLICATION DEVELOPMENT COMPANIES
  • The Ten Golden Rules on Living the Good Life
  • Android M vs. Android Lollipop: What Are The Sweet New Features And Changes?
  • The iOS Design Guidelines
  • 7 Project Management Tools that are making Life Simpler for Project Managers

Categories

  • Android (4)
  • General (16)
  • Humor (5)
  • iPhone (28)
  • life (7)
  • Motivational (21)
  • My story (1)
  • PhoneGap (1)
  • Project Management (27)
  • Technology (13)
  • Uncategorized (4)

Calendar

January 2021
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Oct    

Archives

  • October 2016 (1)
  • July 2015 (3)
  • November 2013 (4)
  • September 2013 (2)
  • February 2012 (6)
  • September 2010 (1)
  • August 2010 (4)
  • July 2010 (3)
  • June 2010 (6)
  • January 2010 (6)
  • October 2009 (3)
  • September 2009 (2)
  • August 2009 (3)
  • July 2009 (6)
  • May 2009 (8)
  • April 2009 (4)
  • March 2009 (8)
  • February 2009 (8)
  • January 2009 (21)
  • December 2008 (23)
  • November 2008 (4)

Recent Comments

  • Rogelio on 7 Ways to Make a Good Impression
  • garcinia on iPhone 4G features. What do you want?
  • http://jeanperal.wordpress.com on Avoiding iPhone App Rejection From Apple
  • online payday loan companies on Avoiding iPhone App Rejection From Apple
  • Tracie on Avoiding iPhone App Rejection From Apple

Blog Stats

  • 12,040 hits

Top Clicks

  • None

RSS Top News

  • An error has occurred; the feed is probably down. Try again later.

Categories Cloud

Android General Humor iPhone life Motivational My story PhoneGap Project Management Technology Uncategorized

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 4 other followers

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy