SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Technologies
www.tops-int.com

TOPS Technologies…..

TOPS

What is UI Element in iPhone Development?
http://www.tops-int.com/live-project-training-iphone.html

1
What UI Elements are?
• UI elements are visual elements that we can see in our applications.
Some of these elements respond to user interactions such as buttons,
text fields and others are informative such as images, labels.

How to add UI elements?
• We can add UI elements both in code and with the help of
interface builder. Depending on the need we can use either
one of them.

http://www.tops-int.com/live-project-training-iphone.html

2
• Our Focus
• We'll be focusing more on adding UI elements through code in
our applications. Using interface builder is simple and straight
forward, we just need to drag and drop UI elements.

• Our Approach
• We will create a simple iOS application and use it for explaining
some of the UI elements.

• Steps
1. Create a View based application as we did in our First iOS
application.
http://www.tops-int.com/live-project-training-iphone.html

3
2. We will be only updating the ViewController.h and ViewController.m
files.
3. Then we add a method to our ViewController.m file specific to
creating the UI element.
4. We will call this method in our viewDidLoad method.

5. The important lines of code have been explained in the code with
single line comment above those lines.

http://www.tops-int.com/live-project-training-iphone.html

4
List of UI Elements
• UI specific elements and their related functionalies are explained
below,
1

Text Fields
It is an UI element that enables the app to get user input.

2

Input types - TextFields
We can set the type of input that user can give by using the
keyboard property of UITextField

3

Buttons
It is used for handling user actions.

http://www.tops-int.com/live-project-training-iphone.html

5
4

Label
It is used for displaying static content.

5

Toolbar
It is used if we want to manipulate something based on our
current view.

6

Status Bar
It displays the key information of device.

7

Navigation Bar
It contains the navigation buttons of a navigation controller
which is a stack of view controllers which can be pushed and
popped.

8

Tab Bar
It generally used to switch between various subtasks, views or
models within the same view.

9

Image View
It is used to display a simple image or sequence of images.
http://www.tops-int.com/live-project-training-iphone.html

6
10

Scroll View
It is used to display content that is more than the area of
screen.

11

Table View
It is used for displaying scrollable list of data in multiple rows
and sections.

12

Split View
It is used for displaying a two panes with master pane
controlling information on detail pane.

13

Text View
It is used for displaying scrollable list of text information that
is optionally editable.

14

View Transition
It explains the various view transitions between views.

15

Pickers
It is used for displaying for selecting a specific data from a list.

http://www.tops-int.com/live-project-training-iphone.html

7
16

Switches
It is used as disable and enable for actions.

17

Sliders
It is used to allow users to make adjustments to a value
or process throughout a range of allowed values.

18

Alerts
It is used to give important information to user.

19

Icons
It is an image representation used for an action or depict
something related to the application.

http://www.tops-int.com/live-project-training-iphone.html

8
1. Use of text field
• A text field is an UI element that enables the app to get user input
• An UITextfield is shown below

Important properties of text field are
•
•
•
•
•
•

Placeholder text which is shown when there is no user input
Normal text
Auto correction type
Key board type
Return key type
Clear button mode

http://www.tops-int.com/live-project-training-iphone.html

9
• Alignment
• Delegate

Updating properties in xib
• You can change text field properties in
xib in the attributes inspector in the
utilities area (right side of the Window).

http://www.tops-int.com/live-project-training-iphone.html

10
2. Input types – Text Fields
Why Input types?
• Key board input types help us get the required input from user. It
removes unwanted keys and includes needed ones. We can set the
type of input that user can give by using the keyboard property of
UITextField.
Eg : textField. keyboardType = UIKeyboardTypeDefault

Keyboard Input types
Input Type

Description

UIKeyboardTypeASCIICapable

Keyboard includes all standard
ASCII characters

UIKeyboardTypeNumbersAndPun
ctuation

Keyboard display numbers and
punctuations once its shown.

http://www.tops-int.com/live-project-training-iphone.html

11
UIKeyboardTypeURL

Keyboard is optimized for URL
entry.

UIKeyboardTypeNumberPad

Keyboard is used for PIN input and
show a numeric keyboard.

UIKeyboardTypePhonePad

Keyboard is optimized for entering
phone numbers.

UIKeyboardTypeNamePhonePad

Keyboard is used for entering name
or phone number.

UIKeyboardTypeEmailAddress

Keyboard is optimized for entering
email address.

UIKeyboardTypeDecimalPad

Keyboard is used for entering
decimal numbers.

UIKeyboardTypeTwitter

Keyboard is optimized for twitter
with @ and # symbols.

http://www.tops-int.com/live-project-training-iphone.html

12
3. iOS - Buttons
• Use of buttons
Buttons are used for handling user actions.
It intercepts the touch events and sends
message to the target object.

• A round rect button

• Button properties in xib
You can change button properties in
xib in the attributes inspector in the utilities
area (right side of the Window).
http://www.tops-int.com/live-project-training-iphone.html

13
Buttons types
•
•
•
•
•
•

UIButtonTypeCustom
UIButtonTypeRoundedRect
UIButtonTypeDetailDisclosure
UIButtonTypeInfoLight
UIButtonTypeInfoDark
UIButtonTypeContactAdd

Important properties
• imageView
• titleLabel

http://www.tops-int.com/live-project-training-iphone.html

14
4. iOS - Lable
Use of Labels
Labels are used for displaying static content which consists of a single
line or multiple lines.

Important properties
•
•
•
•
•

textAlignment
textColor
text
numberOflines
lineBreakMode

http://www.tops-int.com/live-project-training-iphone.html

15
5. iOS - Toolbar
Use of toolbar
If we want to manipulate something based on our current view we
can use toolbar.
• Example would be the email app with an inbox item having options to
delete, make favourite, reply and so on. It is shown below.

Important properties
• barStyle
• items

http://www.tops-int.com/live-project-training-iphone.html

16
6. iOS – Status Bar
Use of status bar
Status bar displays the key information of device like
• Device model or network provider
• Network strength
• Battery information
• Time
Status bar is shown below

Method that hides status bar
[[UIApplication sharedApplication] setStatusBarHidden:YES];
http://www.tops-int.com/live-project-training-iphone.html

17
Alternate way to hide status bar
We can also hide status bar with the help of info.plist by adding a row
and selecting UIStatusBarHidden and make its value to NO.

7. iOS – Navigation Bar
Use of Navigation bar
Navigation bar contains the navigation buttons of a navigation
controller which is a stack of view controllers which can be pushed
and popped. Title on the navigation bar is the title of the current view
controller.

Sample Steps
18

http://www.tops-int.com/live-project-training-iphone.html
• Create a view based application.
• Now select the App Delegate.h and add a property for navigation
controller
• Now update the application:didFinishLaunchingWithOptions:
method in AppDelegate.m file to allocate the navigation controller
and makes it window's root view controller.
• Now add new class file TempViewController by selecting File -> New
->File... -> Objective C Class and then name the Class as
TempViewController with subclass UIViewController.
• Add a UIButton navButon in ViewController.h
• Now add a method addNavigationBarItem and call the method in
viewDidLoad.
• Create a method for navigation item action.
• We also need to create another method to push another view
controller TempViewController.
• The updated ViewController.m
RUN
http://www.tops-int.com/live-project-training-iphone.html

19
8. iOS – Tab bar
Use of tab bar
It's generally used to switch between various subtasks, views or
models within the same view.
Example for tab bar is shown below

Important properties
• backgroundImage
• items
• selected Item
Sample Steps
http://www.tops-int.com/live-project-training-iphone.html

20
• Create a new project and select Tabbed Application instead of the
View Based application and click next, Give the project name and
select create.
• Here two view controllers are created by default and a tab bar is
added to our application.
• The AppDelegate.m didFinishLaunchingWithOptions method.
• Here two view controllers are allocated and made as view controllers
of our tab bar controller.
• Now when we run the application we'll get the Output.

http://www.tops-int.com/live-project-training-iphone.html

21
9. iOS – Image View
Use of Image View
Image view is used for displaying a single image or animated
sequence of images.

Important properties
•
•
•
•
•

image
highlightedImage
userInteractionEnabled
animationImages
animationRepeatCount

http://www.tops-int.com/live-project-training-iphone.html

22
10. iOS – Scroll View
Use of Scroll View
Scroll View is used for displaying content more than the size of the
screen. It can contain all of the other UI elements like image views,
labels, text views and even another scroll view itself.

Important properties
•
•
•
•

contentSize
contentInset
contentOffset
delegate

Important methods
- (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated
http://www.tops-int.com/live-project-training-iphone.html

23
11. Table View
Use of Table View
It is used for displaying a vertically scrollable view which consists of
number of cells (generally reusable cells). It has special features like
headers, footers, rows and section.

Important properties
•
•
•
•
•
•
•
•

delegate
dataSource
rowHeight
sectionFooterHeight
sectionHeaderHeight
separatorColor
tableHeaderView
tableFooterView

http://www.tops-int.com/live-project-training-iphone.html

24
12. iOS – Split View
Use of Split View
Split View is iPad specific container view controller for managing two
view controllers side by side, a master in the left and a detail view
controller to its right.

Important properties
• delegate
• viewControllers

Sample code and steps
• Create a new project and select Master Detail Application instead of
the View Based application and click next, Give the project name and
select create.
http://www.tops-int.com/live-project-training-iphone.html

25
• A simple split view controller with a table view in master is created by
default.
• The files created a little bit different from our View Based application.
Here we have the following files created for us.
• AppDelegate.h
• AppDelegate.m
• DetailViewController.h
• DetailViewController.m
• DetailViewController.xib
• MasterViewController.h
• MasterViewController.m
• MasterViewController.xib

http://www.tops-int.com/live-project-training-iphone.html

26
13. iOS – Text View
Use of Text View
Text View is used displaying multi line of scrollable text which is
optionally editable.

Important properties
•
•
•
•
•
•
•
•

dataDetectorTypes
delegate
editable
inputAccessoryView
inputView
text
textAlignment
textColor

http://www.tops-int.com/live-project-training-iphone.html

27
14. iOS – View Transitions
Use of View Transitions
View Transitions are effective way of adding one view on another
view with a proper transition animation effect.

Update ViewController.h
Declare two view instances in ViewController class.

Update ViewController.xib as follows

http://www.tops-int.com/live-project-training-iphone.html

28
http://www.tops-int.com/live-project-training-iphone.html

29
15. iOS - Pickers
Use of Pickers
Pickers consist of a rotating scrollable view which is used for picking a
value from the list of items.

Important properties
• delegate
• dataSource

http://www.tops-int.com/live-project-training-iphone.html

30
16. iOS - Switches
Use of Switches
Switches are used to toggle between on and off states.

Important properties
• onImage
• offImage
• On

Important method
- (void)setOn:(BOOL)on animated:(BOOL)animated
http://www.tops-int.com/live-project-training-iphone.html

31
17. iOS - Sliders
Use of Sliders
Sliders are used to choose a single value from a range of values.

Important properties
•
•
•
•

continuous
maximumValue
minimumValue
value

Important method
- (void)setValue:(float)value animated:(BOOL)animated
http://www.tops-int.com/live-project-training-iphone.html

32
18. iOS - Alerts
Use of Alerts
Alerts are used to give important information to user. Only after
selecting the option in the alert view we can proceed further using
the app.

Important properties
•
•
•
•
•
•

alertViewStyle
cancelButtonIndex
delegate
message
numberOfButtons
title

Important methods
- (NSInteger)addButtonWithTitle:(NSString *)title
http://www.tops-int.com/live-project-training-iphone.html

33
19. iOS - Icons
Use of Icons
It is an image representation used for an action or depicts something related
to the application.

Different icons in iOS
•
•
•
•
•

AppIcon
App icon for the App Store
Small icon for Spotlight search results and Settings
Toolbar and navigation bar icon
Tab bar icon

AppIcon
AppIcon is the icon for application that appears on the device
springboard (the default screen that consists of all the applications.)
http://www.tops-int.com/live-project-training-iphone.html

34
App icon for the App Store
It is a high resolution image of app icon of size 512 x 512 or 1024 x
1024(recommended)

Small icon for Spotlight search results and Settings
This small icon is used in searched list of application. It is also used in
the settings screen where the features related to the application are
enabled and disabled. Enabling location services is one such example.

Toolbar and navigation bar icon
There are list of standard icons that are specially made for use in the
toolbar and navigation bar. It includes icons like
share, camera, compose and so on.

Tab bar icon
There is a list of standard icons that are specially made for use in Tab
bar. It includes icons like bookmarks, contacts, downloads and so on.
http://www.tops-int.com/live-project-training-iphone.html

35
Contact Us For iPhone Training
Ahmedabad Office (C.G Road)

903, Samedh Complex,
Next to Associated Petrol Pump,
CG Road,
Ahmedabad 380009.
Contact No. 99747 55006

Ahmedabad Office (Maninagar)

401, Amruta Arcade 4th Floor,
Maninagar Char Rasta,
Near Rly Station,
Maninagar.
Contact No.99748 63333

http://www.tops-int.com/live-project-training-iphone.html

36
http://www.tops-int.com/live-project-training-iphone.html

37

Weitere ähnliche Inhalte

Ă„hnlich wie What is ui element in i phone developmetn

Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of XcodeDhaval Kaneria
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfCristina Vidu
 
Oracle forms 6_i__1_
Oracle forms 6_i__1_Oracle forms 6_i__1_
Oracle forms 6_i__1_shashi.vaichal
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdkAlessio Ricco
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI PresentationAjeeth Pingle
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02Rich Helton
 
App design guide
App design guideApp design guide
App design guideJintin Lin
 
[iOS] Basic UI Elements
[iOS] Basic UI Elements[iOS] Basic UI Elements
[iOS] Basic UI ElementsNikmesoft Ltd
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE IntroductionAhllen Javier
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfsheenmarie0212
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outletsveeracynixit
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outletsveeracynixit
 

Ă„hnlich wie What is ui element in i phone developmetn (20)

Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Mobile Application Development class 003
Mobile Application Development class 003Mobile Application Development class 003
Mobile Application Development class 003
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdf
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Visual basic
Visual basic Visual basic
Visual basic
 
Swift
SwiftSwift
Swift
 
Oracle forms 6_i__1_
Oracle forms 6_i__1_Oracle forms 6_i__1_
Oracle forms 6_i__1_
 
Titanium appcelerator sdk
Titanium appcelerator sdkTitanium appcelerator sdk
Titanium appcelerator sdk
 
Ui 5
Ui   5Ui   5
Ui 5
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI Presentation
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02
 
App design guide
App design guideApp design guide
App design guide
 
[iOS] Basic UI Elements
[iOS] Basic UI Elements[iOS] Basic UI Elements
[iOS] Basic UI Elements
 
Ios
IosIos
Ios
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
Visual Basic.pptx
Visual Basic.pptxVisual Basic.pptx
Visual Basic.pptx
 
Visual basic
Visual basicVisual basic
Visual basic
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 

Mehr von TOPS Technologies

Learn java objects inheritance-overriding-polymorphism
Learn java objects  inheritance-overriding-polymorphismLearn java objects  inheritance-overriding-polymorphism
Learn java objects inheritance-overriding-polymorphismTOPS Technologies
 
Surat tops conducted one hour seminar on “corporate basic skills”
Surat tops conducted  one hour seminar on “corporate basic skills”Surat tops conducted  one hour seminar on “corporate basic skills”
Surat tops conducted one hour seminar on “corporate basic skills”TOPS Technologies
 
Word press interview question and answer tops technologies
Word press interview question and answer   tops technologiesWord press interview question and answer   tops technologies
Word press interview question and answer tops technologiesTOPS Technologies
 
How to install android sdk
How to install android sdkHow to install android sdk
How to install android sdkTOPS Technologies
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assuranceTOPS Technologies
 
Basics in software testing
Basics in software testingBasics in software testing
Basics in software testingTOPS Technologies
 
Learn advanced java programming
Learn advanced java programmingLearn advanced java programming
Learn advanced java programmingTOPS Technologies
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applicationsTOPS Technologies
 
Java live project training
Java live project trainingJava live project training
Java live project trainingTOPS Technologies
 
Software testing live project training
Software testing live project trainingSoftware testing live project training
Software testing live project trainingTOPS Technologies
 
Web designing live project training
Web designing live project trainingWeb designing live project training
Web designing live project trainingTOPS Technologies
 
Php live project training
Php live project trainingPhp live project training
Php live project trainingTOPS Technologies
 
iPhone training in ahmedabad by tops technologies
iPhone training in ahmedabad by tops technologiesiPhone training in ahmedabad by tops technologies
iPhone training in ahmedabad by tops technologiesTOPS Technologies
 
Php training in ahmedabad
Php training in ahmedabadPhp training in ahmedabad
Php training in ahmedabadTOPS Technologies
 
Java training in ahmedabad
Java training in ahmedabadJava training in ahmedabad
Java training in ahmedabadTOPS Technologies
 
08 10-2013 gtu projects - develop final sem gtu project in i phone
08 10-2013 gtu projects - develop final sem gtu project in i phone08 10-2013 gtu projects - develop final sem gtu project in i phone
08 10-2013 gtu projects - develop final sem gtu project in i phoneTOPS Technologies
 
GTU PHP Project Training Guidelines
GTU PHP Project Training GuidelinesGTU PHP Project Training Guidelines
GTU PHP Project Training GuidelinesTOPS Technologies
 
GTU Asp.net Project Training Guidelines
GTU Asp.net Project Training GuidelinesGTU Asp.net Project Training Guidelines
GTU Asp.net Project Training GuidelinesTOPS Technologies
 
GTU Guidelines for Project on JAVA
GTU Guidelines for Project on JAVAGTU Guidelines for Project on JAVA
GTU Guidelines for Project on JAVATOPS Technologies
 

Mehr von TOPS Technologies (20)

Learn java objects inheritance-overriding-polymorphism
Learn java objects  inheritance-overriding-polymorphismLearn java objects  inheritance-overriding-polymorphism
Learn java objects inheritance-overriding-polymorphism
 
Surat tops conducted one hour seminar on “corporate basic skills”
Surat tops conducted  one hour seminar on “corporate basic skills”Surat tops conducted  one hour seminar on “corporate basic skills”
Surat tops conducted one hour seminar on “corporate basic skills”
 
Word press interview question and answer tops technologies
Word press interview question and answer   tops technologiesWord press interview question and answer   tops technologies
Word press interview question and answer tops technologies
 
How to install android sdk
How to install android sdkHow to install android sdk
How to install android sdk
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assurance
 
Basics in software testing
Basics in software testingBasics in software testing
Basics in software testing
 
Learn advanced java programming
Learn advanced java programmingLearn advanced java programming
Learn advanced java programming
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
How to create android applications
How to create android applicationsHow to create android applications
How to create android applications
 
Java live project training
Java live project trainingJava live project training
Java live project training
 
Software testing live project training
Software testing live project trainingSoftware testing live project training
Software testing live project training
 
Web designing live project training
Web designing live project trainingWeb designing live project training
Web designing live project training
 
Php live project training
Php live project trainingPhp live project training
Php live project training
 
iPhone training in ahmedabad by tops technologies
iPhone training in ahmedabad by tops technologiesiPhone training in ahmedabad by tops technologies
iPhone training in ahmedabad by tops technologies
 
Php training in ahmedabad
Php training in ahmedabadPhp training in ahmedabad
Php training in ahmedabad
 
Java training in ahmedabad
Java training in ahmedabadJava training in ahmedabad
Java training in ahmedabad
 
08 10-2013 gtu projects - develop final sem gtu project in i phone
08 10-2013 gtu projects - develop final sem gtu project in i phone08 10-2013 gtu projects - develop final sem gtu project in i phone
08 10-2013 gtu projects - develop final sem gtu project in i phone
 
GTU PHP Project Training Guidelines
GTU PHP Project Training GuidelinesGTU PHP Project Training Guidelines
GTU PHP Project Training Guidelines
 
GTU Asp.net Project Training Guidelines
GTU Asp.net Project Training GuidelinesGTU Asp.net Project Training Guidelines
GTU Asp.net Project Training Guidelines
 
GTU Guidelines for Project on JAVA
GTU Guidelines for Project on JAVAGTU Guidelines for Project on JAVA
GTU Guidelines for Project on JAVA
 

KĂĽrzlich hochgeladen

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

KĂĽrzlich hochgeladen (20)

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

What is ui element in i phone developmetn

  • 1. Technologies www.tops-int.com TOPS Technologies….. TOPS What is UI Element in iPhone Development? http://www.tops-int.com/live-project-training-iphone.html 1
  • 2. What UI Elements are? • UI elements are visual elements that we can see in our applications. Some of these elements respond to user interactions such as buttons, text fields and others are informative such as images, labels. How to add UI elements? • We can add UI elements both in code and with the help of interface builder. Depending on the need we can use either one of them. http://www.tops-int.com/live-project-training-iphone.html 2
  • 3. • Our Focus • We'll be focusing more on adding UI elements through code in our applications. Using interface builder is simple and straight forward, we just need to drag and drop UI elements. • Our Approach • We will create a simple iOS application and use it for explaining some of the UI elements. • Steps 1. Create a View based application as we did in our First iOS application. http://www.tops-int.com/live-project-training-iphone.html 3
  • 4. 2. We will be only updating the ViewController.h and ViewController.m files. 3. Then we add a method to our ViewController.m file specific to creating the UI element. 4. We will call this method in our viewDidLoad method. 5. The important lines of code have been explained in the code with single line comment above those lines. http://www.tops-int.com/live-project-training-iphone.html 4
  • 5. List of UI Elements • UI specific elements and their related functionalies are explained below, 1 Text Fields It is an UI element that enables the app to get user input. 2 Input types - TextFields We can set the type of input that user can give by using the keyboard property of UITextField 3 Buttons It is used for handling user actions. http://www.tops-int.com/live-project-training-iphone.html 5
  • 6. 4 Label It is used for displaying static content. 5 Toolbar It is used if we want to manipulate something based on our current view. 6 Status Bar It displays the key information of device. 7 Navigation Bar It contains the navigation buttons of a navigation controller which is a stack of view controllers which can be pushed and popped. 8 Tab Bar It generally used to switch between various subtasks, views or models within the same view. 9 Image View It is used to display a simple image or sequence of images. http://www.tops-int.com/live-project-training-iphone.html 6
  • 7. 10 Scroll View It is used to display content that is more than the area of screen. 11 Table View It is used for displaying scrollable list of data in multiple rows and sections. 12 Split View It is used for displaying a two panes with master pane controlling information on detail pane. 13 Text View It is used for displaying scrollable list of text information that is optionally editable. 14 View Transition It explains the various view transitions between views. 15 Pickers It is used for displaying for selecting a specific data from a list. http://www.tops-int.com/live-project-training-iphone.html 7
  • 8. 16 Switches It is used as disable and enable for actions. 17 Sliders It is used to allow users to make adjustments to a value or process throughout a range of allowed values. 18 Alerts It is used to give important information to user. 19 Icons It is an image representation used for an action or depict something related to the application. http://www.tops-int.com/live-project-training-iphone.html 8
  • 9. 1. Use of text field • A text field is an UI element that enables the app to get user input • An UITextfield is shown below Important properties of text field are • • • • • • Placeholder text which is shown when there is no user input Normal text Auto correction type Key board type Return key type Clear button mode http://www.tops-int.com/live-project-training-iphone.html 9
  • 10. • Alignment • Delegate Updating properties in xib • You can change text field properties in xib in the attributes inspector in the utilities area (right side of the Window). http://www.tops-int.com/live-project-training-iphone.html 10
  • 11. 2. Input types – Text Fields Why Input types? • Key board input types help us get the required input from user. It removes unwanted keys and includes needed ones. We can set the type of input that user can give by using the keyboard property of UITextField. Eg : textField. keyboardType = UIKeyboardTypeDefault Keyboard Input types Input Type Description UIKeyboardTypeASCIICapable Keyboard includes all standard ASCII characters UIKeyboardTypeNumbersAndPun ctuation Keyboard display numbers and punctuations once its shown. http://www.tops-int.com/live-project-training-iphone.html 11
  • 12. UIKeyboardTypeURL Keyboard is optimized for URL entry. UIKeyboardTypeNumberPad Keyboard is used for PIN input and show a numeric keyboard. UIKeyboardTypePhonePad Keyboard is optimized for entering phone numbers. UIKeyboardTypeNamePhonePad Keyboard is used for entering name or phone number. UIKeyboardTypeEmailAddress Keyboard is optimized for entering email address. UIKeyboardTypeDecimalPad Keyboard is used for entering decimal numbers. UIKeyboardTypeTwitter Keyboard is optimized for twitter with @ and # symbols. http://www.tops-int.com/live-project-training-iphone.html 12
  • 13. 3. iOS - Buttons • Use of buttons Buttons are used for handling user actions. It intercepts the touch events and sends message to the target object. • A round rect button • Button properties in xib You can change button properties in xib in the attributes inspector in the utilities area (right side of the Window). http://www.tops-int.com/live-project-training-iphone.html 13
  • 15. 4. iOS - Lable Use of Labels Labels are used for displaying static content which consists of a single line or multiple lines. Important properties • • • • • textAlignment textColor text numberOflines lineBreakMode http://www.tops-int.com/live-project-training-iphone.html 15
  • 16. 5. iOS - Toolbar Use of toolbar If we want to manipulate something based on our current view we can use toolbar. • Example would be the email app with an inbox item having options to delete, make favourite, reply and so on. It is shown below. Important properties • barStyle • items http://www.tops-int.com/live-project-training-iphone.html 16
  • 17. 6. iOS – Status Bar Use of status bar Status bar displays the key information of device like • Device model or network provider • Network strength • Battery information • Time Status bar is shown below Method that hides status bar [[UIApplication sharedApplication] setStatusBarHidden:YES]; http://www.tops-int.com/live-project-training-iphone.html 17
  • 18. Alternate way to hide status bar We can also hide status bar with the help of info.plist by adding a row and selecting UIStatusBarHidden and make its value to NO. 7. iOS – Navigation Bar Use of Navigation bar Navigation bar contains the navigation buttons of a navigation controller which is a stack of view controllers which can be pushed and popped. Title on the navigation bar is the title of the current view controller. Sample Steps 18 http://www.tops-int.com/live-project-training-iphone.html
  • 19. • Create a view based application. • Now select the App Delegate.h and add a property for navigation controller • Now update the application:didFinishLaunchingWithOptions: method in AppDelegate.m file to allocate the navigation controller and makes it window's root view controller. • Now add new class file TempViewController by selecting File -> New ->File... -> Objective C Class and then name the Class as TempViewController with subclass UIViewController. • Add a UIButton navButon in ViewController.h • Now add a method addNavigationBarItem and call the method in viewDidLoad. • Create a method for navigation item action. • We also need to create another method to push another view controller TempViewController. • The updated ViewController.m RUN http://www.tops-int.com/live-project-training-iphone.html 19
  • 20. 8. iOS – Tab bar Use of tab bar It's generally used to switch between various subtasks, views or models within the same view. Example for tab bar is shown below Important properties • backgroundImage • items • selected Item Sample Steps http://www.tops-int.com/live-project-training-iphone.html 20
  • 21. • Create a new project and select Tabbed Application instead of the View Based application and click next, Give the project name and select create. • Here two view controllers are created by default and a tab bar is added to our application. • The AppDelegate.m didFinishLaunchingWithOptions method. • Here two view controllers are allocated and made as view controllers of our tab bar controller. • Now when we run the application we'll get the Output. http://www.tops-int.com/live-project-training-iphone.html 21
  • 22. 9. iOS – Image View Use of Image View Image view is used for displaying a single image or animated sequence of images. Important properties • • • • • image highlightedImage userInteractionEnabled animationImages animationRepeatCount http://www.tops-int.com/live-project-training-iphone.html 22
  • 23. 10. iOS – Scroll View Use of Scroll View Scroll View is used for displaying content more than the size of the screen. It can contain all of the other UI elements like image views, labels, text views and even another scroll view itself. Important properties • • • • contentSize contentInset contentOffset delegate Important methods - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated http://www.tops-int.com/live-project-training-iphone.html 23
  • 24. 11. Table View Use of Table View It is used for displaying a vertically scrollable view which consists of number of cells (generally reusable cells). It has special features like headers, footers, rows and section. Important properties • • • • • • • • delegate dataSource rowHeight sectionFooterHeight sectionHeaderHeight separatorColor tableHeaderView tableFooterView http://www.tops-int.com/live-project-training-iphone.html 24
  • 25. 12. iOS – Split View Use of Split View Split View is iPad specific container view controller for managing two view controllers side by side, a master in the left and a detail view controller to its right. Important properties • delegate • viewControllers Sample code and steps • Create a new project and select Master Detail Application instead of the View Based application and click next, Give the project name and select create. http://www.tops-int.com/live-project-training-iphone.html 25
  • 26. • A simple split view controller with a table view in master is created by default. • The files created a little bit different from our View Based application. Here we have the following files created for us. • AppDelegate.h • AppDelegate.m • DetailViewController.h • DetailViewController.m • DetailViewController.xib • MasterViewController.h • MasterViewController.m • MasterViewController.xib http://www.tops-int.com/live-project-training-iphone.html 26
  • 27. 13. iOS – Text View Use of Text View Text View is used displaying multi line of scrollable text which is optionally editable. Important properties • • • • • • • • dataDetectorTypes delegate editable inputAccessoryView inputView text textAlignment textColor http://www.tops-int.com/live-project-training-iphone.html 27
  • 28. 14. iOS – View Transitions Use of View Transitions View Transitions are effective way of adding one view on another view with a proper transition animation effect. Update ViewController.h Declare two view instances in ViewController class. Update ViewController.xib as follows http://www.tops-int.com/live-project-training-iphone.html 28
  • 30. 15. iOS - Pickers Use of Pickers Pickers consist of a rotating scrollable view which is used for picking a value from the list of items. Important properties • delegate • dataSource http://www.tops-int.com/live-project-training-iphone.html 30
  • 31. 16. iOS - Switches Use of Switches Switches are used to toggle between on and off states. Important properties • onImage • offImage • On Important method - (void)setOn:(BOOL)on animated:(BOOL)animated http://www.tops-int.com/live-project-training-iphone.html 31
  • 32. 17. iOS - Sliders Use of Sliders Sliders are used to choose a single value from a range of values. Important properties • • • • continuous maximumValue minimumValue value Important method - (void)setValue:(float)value animated:(BOOL)animated http://www.tops-int.com/live-project-training-iphone.html 32
  • 33. 18. iOS - Alerts Use of Alerts Alerts are used to give important information to user. Only after selecting the option in the alert view we can proceed further using the app. Important properties • • • • • • alertViewStyle cancelButtonIndex delegate message numberOfButtons title Important methods - (NSInteger)addButtonWithTitle:(NSString *)title http://www.tops-int.com/live-project-training-iphone.html 33
  • 34. 19. iOS - Icons Use of Icons It is an image representation used for an action or depicts something related to the application. Different icons in iOS • • • • • AppIcon App icon for the App Store Small icon for Spotlight search results and Settings Toolbar and navigation bar icon Tab bar icon AppIcon AppIcon is the icon for application that appears on the device springboard (the default screen that consists of all the applications.) http://www.tops-int.com/live-project-training-iphone.html 34
  • 35. App icon for the App Store It is a high resolution image of app icon of size 512 x 512 or 1024 x 1024(recommended) Small icon for Spotlight search results and Settings This small icon is used in searched list of application. It is also used in the settings screen where the features related to the application are enabled and disabled. Enabling location services is one such example. Toolbar and navigation bar icon There are list of standard icons that are specially made for use in the toolbar and navigation bar. It includes icons like share, camera, compose and so on. Tab bar icon There is a list of standard icons that are specially made for use in Tab bar. It includes icons like bookmarks, contacts, downloads and so on. http://www.tops-int.com/live-project-training-iphone.html 35
  • 36. Contact Us For iPhone Training Ahmedabad Office (C.G Road) 903, Samedh Complex, Next to Associated Petrol Pump, CG Road, Ahmedabad 380009. Contact No. 99747 55006 Ahmedabad Office (Maninagar) 401, Amruta Arcade 4th Floor, Maninagar Char Rasta, Near Rly Station, Maninagar. Contact No.99748 63333 http://www.tops-int.com/live-project-training-iphone.html 36