SlideShare a Scribd company logo
1 of 48
Nikmesoft Ltd
Basic UI Elements
Linh NGUYEN
Lecture 2
Nikmesoft Ltd
Contents
Overview1
Employing Basic UI Elements2
Working with Containers3
Example 24
Exercise 25
2
Nikmesoft Ltd
Basic UI Elements
Overview
3
Nikmesoft Ltd
Overview
 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.
4
Nikmesoft Ltd
Overview
5
UI
Elements Properties
Delegates
Nikmesoft Ltd
Overview
 Delegates
 Let's assume an object A calls object B to perform an action,
once the action is complete object A should know that B has
completed the task and take necessary action. This is achieved
with the help of delegates.
6
Nikmesoft Ltd
Overview
 Delegates(cont.)
 The key concepts in the above example are:
• A is delegate object of B
• B will have a reference of A
• A will implement the delegate methods of B.
• B will notify A through the delegate methods.
7
Nikmesoft Ltd
Overview
 Delegates(cont.)
8
Nikmesoft Ltd
Overview
 Delegates(cont.)
9
Nikmesoft Ltd
Basic UI Elements
Employing Basic UI Elements
10
Nikmesoft Ltd
Employing Basic UI Elements
 UITextField
 A text field is an UI element that enables the app to get user
input
 Important Properties
• 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
• Alignment
11
Nikmesoft Ltd
Employing Basic UI Elements
 UITextField
 Delegates
• - (void)textFieldDidBeginEditing:(UITextField *)textField
• - (void)textFieldDidEndEditing:(UITextField *)textField
12
Nikmesoft Ltd
Employing Basic UI Elements
 UITextField
 Input Types
• UIKeyboardTypeASCIICapable
• UIKeyboardTypeURL
• UIKeyboardTypeNumberPad
• UIKeyboardTypePhonePad
• UIKeyboardTypeNamePhonePad
• UIKeyboardTypeEmailAddress
• UIKeyboardTypeDecimalPad
• UIKeyboardTypeTwitter
13
Nikmesoft Ltd
Employing Basic UI Elements
 UITextField
 Create a text field by codes
14
Nikmesoft Ltd
Employing Basic UI Elements
 UIButton
 Buttons are used for handling user actions. It intercepts the
touch events and sends message to the target object.
 Important properties
• State Config
• Image
• TitleLabel
15
Nikmesoft Ltd
Employing Basic UI Elements
 UIButton
 Button types
• UIButtonTypeCustom
• UIButtonTypeRoundedRect
• UIButtonTypeDetailDisclosure
• UIButtonTypeInfoLight
• UIButtonTypeInfoDark
• UIButtonTypeContactAdd
16
Nikmesoft Ltd
Employing Basic UI Elements
 UIButton
 Important methods
17
Nikmesoft Ltd
Employing Basic UI Elements
 UILabel
 Labels are used for displaying static content which consists of a
single line or multiple lines.
 Important properties
• textAlignment
• textColor
• text
• numberOflines
• lineBreakMode
18
Nikmesoft Ltd
Employing Basic UI Elements
 UILabel
 Create a Label by code
19
Nikmesoft Ltd
Employing Basic UI Elements
 UIImageView
 Image view is used for displaying a single image or animated
sequence of images.
 Important properties
• image
• highlightedImage
• contentModes
• animationImages
• animationRepeatCount
20
Nikmesoft Ltd
Employing Basic UI Elements
 UIImageView
 Important methods
21
Nikmesoft Ltd
Employing Basic UI Elements
 UITextView
 Text View is used displaying multi line of scrollable text which is
optionally editable.
 Important properties
• editable
• text
• textAlignment
• textColor
22
Nikmesoft Ltd
Employing Basic UI Elements
 UITextView
 Important delegate methods
23
Nikmesoft Ltd
Employing Basic UI Elements
 UISwitch
 Switches are used to toggle between on and off states.
 Important properties
• onImage
• offImage
• on
24
Nikmesoft Ltd
Employing Basic UI Elements
 UISwitch
 Create a switch by code
25
Nikmesoft Ltd
Employing Basic UI Elements
 UISlider
 Sliders are used to choose a single value from a range of values.
 Important properties
• Continuous (If YES, the slider sends update events continuously to the
associated target’s action method. If NO, the slider only sends an action
event when the user releases the slider’s thumb control to set the final
value.)
• maximumValue
• minimumValue
• value
26
Nikmesoft Ltd
Employing Basic UI Elements
 UISlider
 Create a slider by code
27
Nikmesoft Ltd
Employing Basic UI Elements
 UIAlertView
 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(http://mobile.tutsplus.com/tutorials/iphone/ios-5-sdk-
uialertview-text-input-and-validation/)
• cancelButtonIndex
• message
• numberOfButtons
• title
28
Nikmesoft Ltd
Employing Basic UI Elements
 UIAlertView
 Important methods
29
Nikmesoft Ltd
Employing Basic UI Elements
 UIAlertView
 Create an alert view by code
30
Nikmesoft Ltd
Employing Basic UI Elements
 UIAlertView
 Important delegate methods
31
Nikmesoft Ltd
Basic UI Elements
Working with Containers
32
Nikmesoft Ltd
Employing Basic UI Elements
 UIScrollView
 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
33
Nikmesoft Ltd
Employing Basic UI Elements
 UIScrollView
 Important properties
• ContentInset
34
Nikmesoft Ltd
Employing Basic UI Elements
 UIScrollView
 Important methods
35
Nikmesoft Ltd
Employing Basic UI Elements
 UIScrollView
 Create a scroll view by code
36
Nikmesoft Ltd
Example 2.1
37
Nikmesoft Ltd
Employing Basic UI Elements
 UITableView
 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
38
Nikmesoft Ltd
Employing Basic UI Elements
 UITableView
 Important properties(cont.)
• separatorColor
• tableHeaderView
• tableFooterView
• Style(Plain or Group)
39
Nikmesoft Ltd
Employing Basic UI Elements
 UITableView
 Important data source methods
40
Nikmesoft Ltd
Employing Basic UI Elements
 UITableView
 Important delegate methods
41
Nikmesoft Ltd
Example 2.2
42
Nikmesoft Ltd
Example 2.2
43
Nikmesoft Ltd
Employing Basic UI Elements
 UIPickerView
 Pickers consist of a rotating scrollable view which is used for
picking a value from the list of items.
 Important properties
• delegate
• dataSource
44
Nikmesoft Ltd
Employing Basic UI Elements
 UIPickerView
 Important data source methods
45
Nikmesoft Ltd
Employing Basic UI Elements
 UIPickerView
 Important delegate methods
46
Nikmesoft Ltd
Exercise 2
47
 Contact App
 TableView with XIB custom cell
 Section by first character of Last Name
 Bold font for Last Name
 Index (http://www.iphonedevcentral.com/indexed-uitableview-tutorial/)
Nikmesoft Ltd
48

More Related Content

Viewers also liked

UX Design for Mobile Apps
UX Design for Mobile AppsUX Design for Mobile Apps
UX Design for Mobile Apps
Kamil Zieba
 

Viewers also liked (16)

Why users can't find answers in help material
Why users can't find answers in help materialWhy users can't find answers in help material
Why users can't find answers in help material
 
Haas Innovation Challenges Presentation
Haas Innovation Challenges PresentationHaas Innovation Challenges Presentation
Haas Innovation Challenges Presentation
 
UX Design for Mobile Apps
UX Design for Mobile AppsUX Design for Mobile Apps
UX Design for Mobile Apps
 
Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)
 
TechTalk 77 UI & UX Presentation
TechTalk 77 UI & UX PresentationTechTalk 77 UI & UX Presentation
TechTalk 77 UI & UX Presentation
 
Indonesia Digital & Social Media Case Study
Indonesia Digital & Social Media Case StudyIndonesia Digital & Social Media Case Study
Indonesia Digital & Social Media Case Study
 
5 UX Mistakes that are killing your products
5 UX Mistakes that are killing your products5 UX Mistakes that are killing your products
5 UX Mistakes that are killing your products
 
Mobile First Design Strategy & Process
Mobile First Design Strategy & ProcessMobile First Design Strategy & Process
Mobile First Design Strategy & Process
 
So you want to be a Service Designer
So you want to be a Service DesignerSo you want to be a Service Designer
So you want to be a Service Designer
 
Data in the city
Data in the cityData in the city
Data in the city
 
Ui ux designing principles
Ui ux designing principlesUi ux designing principles
Ui ux designing principles
 
Introduction on Service Design
Introduction on Service DesignIntroduction on Service Design
Introduction on Service Design
 
ProductTank: What do UX people want from PMs and how can they best work toget...
ProductTank: What do UX people want from PMs and how can they best work toget...ProductTank: What do UX people want from PMs and how can they best work toget...
ProductTank: What do UX people want from PMs and how can they best work toget...
 
UX Experience Design: Processes and Strategy
UX Experience Design: Processes and StrategyUX Experience Design: Processes and Strategy
UX Experience Design: Processes and Strategy
 
Service Design Workshop: Designing the Customer Experience
Service Design Workshop: Designing the Customer ExperienceService Design Workshop: Designing the Customer Experience
Service Design Workshop: Designing the Customer Experience
 
Agile explained
Agile explainedAgile explained
Agile explained
 

Similar to [iOS] Basic UI Elements

Vb.net session 10
Vb.net session 10Vb.net session 10
Vb.net session 10
Niit Care
 
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
Applitools
 
Vb.net session 02
Vb.net session 02Vb.net session 02
Vb.net session 02
Niit Care
 
Component interface
Component interfaceComponent interface
Component interface
JAYAARC
 

Similar to [iOS] Basic UI Elements (20)

What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetn
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Visual basic
Visual basic Visual basic
Visual basic
 
iPhone Programming [3/17] : Basic UI
iPhone Programming [3/17] : Basic UIiPhone Programming [3/17] : Basic UI
iPhone Programming [3/17] : Basic UI
 
Vb.net session 10
Vb.net session 10Vb.net session 10
Vb.net session 10
 
Basic iOS Training with SWIFT - Part 3
Basic iOS Training with SWIFT - Part 3Basic iOS Training with SWIFT - Part 3
Basic iOS Training with SWIFT - Part 3
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose React
 
Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...
 
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
Testing Design System Changes Across Your Application -- Intuit Use Case -- w...
 
Vb.net session 02
Vb.net session 02Vb.net session 02
Vb.net session 02
 
Component interface
Component interfaceComponent interface
Component interface
 
Unit 2
Unit 2Unit 2
Unit 2
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdf
 
44c
44c44c
44c
 
Android App development III
Android App development IIIAndroid App development III
Android App development III
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
RPA Summer School Studio Session 3 AMER: Introduction to Ui Automation
RPA Summer School Studio Session 3 AMER: Introduction to Ui AutomationRPA Summer School Studio Session 3 AMER: Introduction to Ui Automation
RPA Summer School Studio Session 3 AMER: Introduction to Ui Automation
 
iOS Development (Part 1)
iOS Development (Part 1)iOS Development (Part 1)
iOS Development (Part 1)
 
Tools and practices for rapid application development
Tools and practices for rapid application developmentTools and practices for rapid application development
Tools and practices for rapid application development
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 

More from Nikmesoft Ltd

More from Nikmesoft Ltd (15)

[iOS] Networking
[iOS] Networking[iOS] Networking
[iOS] Networking
 
[iOS] Data Storage
[iOS] Data Storage[iOS] Data Storage
[iOS] Data Storage
 
[Android] Multimedia Programming
[Android] Multimedia Programming[Android] Multimedia Programming
[Android] Multimedia Programming
 
[Android] Android Animation
[Android] Android Animation[Android] Android Animation
[Android] Android Animation
 
[Android] 2D Graphics
[Android] 2D Graphics[Android] 2D Graphics
[Android] 2D Graphics
 
[Android] Services and Broadcast Receivers
[Android] Services and Broadcast Receivers[Android] Services and Broadcast Receivers
[Android] Services and Broadcast Receivers
 
[Android] Web services
[Android] Web services[Android] Web services
[Android] Web services
 
[Android] Multiple Background Threads
[Android] Multiple Background Threads[Android] Multiple Background Threads
[Android] Multiple Background Threads
 
[Android] Maps, Geocoding and Location-Based Services
[Android] Maps, Geocoding and Location-Based Services[Android] Maps, Geocoding and Location-Based Services
[Android] Maps, Geocoding and Location-Based Services
 
[Android] Data Storage
[Android] Data Storage[Android] Data Storage
[Android] Data Storage
 
[Android] Intent and Activity
[Android] Intent and Activity[Android] Intent and Activity
[Android] Intent and Activity
 
[Android] Widget Event Handling
[Android] Widget Event Handling[Android] Widget Event Handling
[Android] Widget Event Handling
 
[Android] Using Selection Widgets
[Android] Using Selection Widgets[Android] Using Selection Widgets
[Android] Using Selection Widgets
 
[Android] Basic Widgets and Containers
[Android] Basic Widgets and Containers[Android] Basic Widgets and Containers
[Android] Basic Widgets and Containers
 
[Android] Introduction to Android Programming
[Android] Introduction to Android Programming[Android] Introduction to Android Programming
[Android] Introduction to Android Programming
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

[iOS] Basic UI Elements

  • 1. Nikmesoft Ltd Basic UI Elements Linh NGUYEN Lecture 2
  • 2. Nikmesoft Ltd Contents Overview1 Employing Basic UI Elements2 Working with Containers3 Example 24 Exercise 25 2
  • 3. Nikmesoft Ltd Basic UI Elements Overview 3
  • 4. Nikmesoft Ltd Overview  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. 4
  • 6. Nikmesoft Ltd Overview  Delegates  Let's assume an object A calls object B to perform an action, once the action is complete object A should know that B has completed the task and take necessary action. This is achieved with the help of delegates. 6
  • 7. Nikmesoft Ltd Overview  Delegates(cont.)  The key concepts in the above example are: • A is delegate object of B • B will have a reference of A • A will implement the delegate methods of B. • B will notify A through the delegate methods. 7
  • 10. Nikmesoft Ltd Basic UI Elements Employing Basic UI Elements 10
  • 11. Nikmesoft Ltd Employing Basic UI Elements  UITextField  A text field is an UI element that enables the app to get user input  Important Properties • 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 • Alignment 11
  • 12. Nikmesoft Ltd Employing Basic UI Elements  UITextField  Delegates • - (void)textFieldDidBeginEditing:(UITextField *)textField • - (void)textFieldDidEndEditing:(UITextField *)textField 12
  • 13. Nikmesoft Ltd Employing Basic UI Elements  UITextField  Input Types • UIKeyboardTypeASCIICapable • UIKeyboardTypeURL • UIKeyboardTypeNumberPad • UIKeyboardTypePhonePad • UIKeyboardTypeNamePhonePad • UIKeyboardTypeEmailAddress • UIKeyboardTypeDecimalPad • UIKeyboardTypeTwitter 13
  • 14. Nikmesoft Ltd Employing Basic UI Elements  UITextField  Create a text field by codes 14
  • 15. Nikmesoft Ltd Employing Basic UI Elements  UIButton  Buttons are used for handling user actions. It intercepts the touch events and sends message to the target object.  Important properties • State Config • Image • TitleLabel 15
  • 16. Nikmesoft Ltd Employing Basic UI Elements  UIButton  Button types • UIButtonTypeCustom • UIButtonTypeRoundedRect • UIButtonTypeDetailDisclosure • UIButtonTypeInfoLight • UIButtonTypeInfoDark • UIButtonTypeContactAdd 16
  • 17. Nikmesoft Ltd Employing Basic UI Elements  UIButton  Important methods 17
  • 18. Nikmesoft Ltd Employing Basic UI Elements  UILabel  Labels are used for displaying static content which consists of a single line or multiple lines.  Important properties • textAlignment • textColor • text • numberOflines • lineBreakMode 18
  • 19. Nikmesoft Ltd Employing Basic UI Elements  UILabel  Create a Label by code 19
  • 20. Nikmesoft Ltd Employing Basic UI Elements  UIImageView  Image view is used for displaying a single image or animated sequence of images.  Important properties • image • highlightedImage • contentModes • animationImages • animationRepeatCount 20
  • 21. Nikmesoft Ltd Employing Basic UI Elements  UIImageView  Important methods 21
  • 22. Nikmesoft Ltd Employing Basic UI Elements  UITextView  Text View is used displaying multi line of scrollable text which is optionally editable.  Important properties • editable • text • textAlignment • textColor 22
  • 23. Nikmesoft Ltd Employing Basic UI Elements  UITextView  Important delegate methods 23
  • 24. Nikmesoft Ltd Employing Basic UI Elements  UISwitch  Switches are used to toggle between on and off states.  Important properties • onImage • offImage • on 24
  • 25. Nikmesoft Ltd Employing Basic UI Elements  UISwitch  Create a switch by code 25
  • 26. Nikmesoft Ltd Employing Basic UI Elements  UISlider  Sliders are used to choose a single value from a range of values.  Important properties • Continuous (If YES, the slider sends update events continuously to the associated target’s action method. If NO, the slider only sends an action event when the user releases the slider’s thumb control to set the final value.) • maximumValue • minimumValue • value 26
  • 27. Nikmesoft Ltd Employing Basic UI Elements  UISlider  Create a slider by code 27
  • 28. Nikmesoft Ltd Employing Basic UI Elements  UIAlertView  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(http://mobile.tutsplus.com/tutorials/iphone/ios-5-sdk- uialertview-text-input-and-validation/) • cancelButtonIndex • message • numberOfButtons • title 28
  • 29. Nikmesoft Ltd Employing Basic UI Elements  UIAlertView  Important methods 29
  • 30. Nikmesoft Ltd Employing Basic UI Elements  UIAlertView  Create an alert view by code 30
  • 31. Nikmesoft Ltd Employing Basic UI Elements  UIAlertView  Important delegate methods 31
  • 32. Nikmesoft Ltd Basic UI Elements Working with Containers 32
  • 33. Nikmesoft Ltd Employing Basic UI Elements  UIScrollView  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 33
  • 34. Nikmesoft Ltd Employing Basic UI Elements  UIScrollView  Important properties • ContentInset 34
  • 35. Nikmesoft Ltd Employing Basic UI Elements  UIScrollView  Important methods 35
  • 36. Nikmesoft Ltd Employing Basic UI Elements  UIScrollView  Create a scroll view by code 36
  • 38. Nikmesoft Ltd Employing Basic UI Elements  UITableView  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 38
  • 39. Nikmesoft Ltd Employing Basic UI Elements  UITableView  Important properties(cont.) • separatorColor • tableHeaderView • tableFooterView • Style(Plain or Group) 39
  • 40. Nikmesoft Ltd Employing Basic UI Elements  UITableView  Important data source methods 40
  • 41. Nikmesoft Ltd Employing Basic UI Elements  UITableView  Important delegate methods 41
  • 44. Nikmesoft Ltd Employing Basic UI Elements  UIPickerView  Pickers consist of a rotating scrollable view which is used for picking a value from the list of items.  Important properties • delegate • dataSource 44
  • 45. Nikmesoft Ltd Employing Basic UI Elements  UIPickerView  Important data source methods 45
  • 46. Nikmesoft Ltd Employing Basic UI Elements  UIPickerView  Important delegate methods 46
  • 47. Nikmesoft Ltd Exercise 2 47  Contact App  TableView with XIB custom cell  Section by first character of Last Name  Bold font for Last Name  Index (http://www.iphonedevcentral.com/indexed-uitableview-tutorial/)