iOS Training
iOS Xcode 6:
Similarly, as with all iOS cases in this book, the advancement of our case will occur inside the Xcode 6 advancement condition. In the event that you have not as of now introduced this instrument together with the most recent iOS SDK allude first to the Installing Xcode 6 and the iOS 8 SDK section of this book. Expecting that the establishment is finished, dispatch Xcode either by tapping on the symbol on the dock (expecting you made one) or utilize the Mac OS X Finder to find Xcode in the Applications envelope of your framework.
On the off chance that you don't see this window, basically, select the Window - > Welcome to Xcode menu alternative to show it. From inside this window, tap on the choice to Create another Xcode venture. This will show the principle Xcode 6 venture window together with the undertaking format board where we can choose a layout coordinating the kind of task we need to create.
The board situated on the left-hand side of the window takes into consideration the choice of the objective stage, giving alternatives to building up an application either for iOS-based gadgets or Mac OS X.
Start by ensuring that the Application alternative situated underneath iOS is chosen. The primary board contains a rundown of layouts accessible to use as the reason for an application. The choices accessible are as per the following:
· Master-Detail Application – Used to make a rundown based application. Choosing a thing from an ace rundown shows a detail see relating to the determination. The layout at that point gives a Back catch to come back to the rundown. You may have seen a comparative method utilized for news based applications, whereby choosing a thing from a rundown of features shows the substance of the relating news article. At the point when utilized for an iPad based application, this layout actualizes an essential split-see arrangement.
· Page-based Application – Creates a format venture utilizing the site visit controller intended to enable perspectives to be progressed by turning pages on the screen.
· Tabbed Application – Creates a formal application with a tab bar. The tab bar regularly shows up over the base of the gadget show and can be customized to contain things that, when chosen, change the primary show to various perspectives. The iPhone's worked in Phone UI, for instance, utilizes a tab bar to enable the client to move between top picks, contacts, keypad, and voice message.
· Single View Application – Creates an essential format for an application containing a solitary view and relating view controller.
· Game – Creates an undertaking arranged to exploit Sprite Kit, Scene Kit, OpenGL ES and Metal for the advancement of 2D and 3D diversions.
The iOS environment now incorporates an assortment of gadgets and screen sizes. While making another task it is conceivable to demonstrate that the venture is planned to target either the iPhone or iPad group of gadgets. With the hole amongst iPad and iPhone screen sizes now decreased by the presentation of the iPad Mini and iPhone 6 Plus it never again bodes well to make an undertaking that objectives only one gadget family. A significantly more sensible approach is to make a solitary venture that tends to all gadget composes and screen sizes. Truth be told, as will be appeared in later sections, Xcode 6 and iOS 8 incorporate various highlights planned particularly to make the objective of general application extends simply to accomplish. In view of this, ensure the Devices menu is set to Universal.
Alongside iOS 8 and Xcode 6, Apple has likewise presented another programming dialect named Swift. While it is as yet conceivable to program utilizing the more seasoned Objective-C dialect, Apple views Swift as the eventual fate of iOS advancement.
All the code cases in this book are composed in Swift, so ensure that the Language menu is set in like manner before tapping on the Next catch. On the last screen, pick an area on the record framework for the new venture to be made and tap on Create.
Creating the iOS App User Interface:
Simply by the very nature of the environment in which they run, iOS apps are typically visually oriented. As such, a key component of just about any app involves a user interface through which the user will interact with the application and, in turn, receive feedback. Whilst it is possible to develop user interfaces by writing code to create and position items on the screen, this is a complex and error-prone process. In recognition of this, Apple provides a tool called Interface Builder which allows a user interface to be visually constructed by dragging and dropping components onto a canvas and setting properties to configure the appearance and behavior of those components.
Interface Builder has originally developed some time ago for creating Mac OS X applications but has now been updated to allow for the design of iOS app user interfaces.
As mentioned in the preceding section, Xcode pre-created a number of files for our project, one of which has a .storyboard filename extension. This is an Interface Builder storyboard save file and the file we are interested in for our HelloWorld project is named Main.storyboard.
Along the best edge of the board is a line of catches which change the settings showed in the upper portion of the board. Of course, the File Inspector is shown. Choices are likewise given to show fast help, the Identity Inspector, Attributes Inspector, Size Inspector, and Connections Inspector. Before continuing, set aside some opportunity to audit every one of these determinations to increase some nature with the setup choices each gives. All through the rest of this book, broad utilization of these investigators will be made.
Changing Component Properties:
With the property board for the View chose in the principle board, we will start our plan work by changing the foundation shade of this view. Begin by ensuring the View is chosen and that the Attributes Inspector (View - > Utilities - > Show Attributes Inspector) is shown in the Utility board. Tap on the white rectangle by the Foundation mark to conjure the Colours exchange. Utilizing the shading determination instrument, pick an outwardly satisfying shading and close the discourse. You will now see that the view window has changed from white to the new shading choice.
Adding Objects to the User Interface:
Having found the Label protest, tap on it and drag it to the focal point of the view with the goal that the vertical and flat focus rules show up. When it is in position discharge the mouse catch to drop it in that area. Scratch off the Object Library seeks by tapping on the "x" catch on the right-hand edge of the pursuit field. Select the recently included name and extend it on a level plane with the goal that it is around three times the present width. With the Label still chosen, tap on the focused arrangement catch in the Attributes Inspector (View - > Utilities - > Show Attributes Inspector) to focus the content amidst the name see.
Dealing with Build Errors:
As we have not actually written or modified any code in this chapter it is unlikely that any errors will be detected during the build and run process. In the unlikely event that something did get inadvertently changed thereby causing the build to fail, it is worth taking a few minutes to talk about build errors within the context of the Xcode environment.
If for any reason a build fails, the status window in the Xcode toolbar will report that an error has been detected by displaying “Build” together with the number of errors detected and any warnings. In addition, the left-hand panel of the Xcode window will update with a list of the errors. Selecting an error from this list will take you to the location in the code where corrective action needs to be taken.
Monitoring Application Performance:
Another helpful element of Xcode is the capacity to screen the execution of an application while it is running. This data is gotten to by showing the Debug Navigator.
At the point when Xcode is propelled, the undertaking pilot is shown in the left-hand board as a matter of course. Along the highest point of this board is a bar with a scope of different choices. The 6th alternative from the left shows the investigate guide when chosen as outlined in. Whenever showed, this board demonstrates various ongoing measurements identifying with the execution of the as of now running application, for example, memory, CPU use, circle get to, organize movement and iCloud stockpiling access.
An Exploded View of the User Interface Layout Hierarchy:
Xcode 6 likewise gives a choice to break the UI format out into a rotatable 3D see that shows how the view chain of importance for a UI is developed. This can be especially helpful for recognizing circumstances where one view question is clouded by another showing up over it or a format isn't showing up as proposed. To get to the View Hierarchy in this mode, run the application and tap on the Debug View Hierarchy catch featured.
iOS @ Greens Technology
A step-by-step iOS Training Chennai to building an iPhone or iPad app for Beginners. This course is designed for beginners who have never coded in Objective-C or build an iOS app. Greens Technology provides best iOS Training in Chennai.
Comments
Post a Comment