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

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 materialTom Johnson
 
Haas Innovation Challenges Presentation
Haas Innovation Challenges PresentationHaas Innovation Challenges Presentation
Haas Innovation Challenges Presentationfrog
 
UX Design for Mobile Apps
UX Design for Mobile AppsUX Design for Mobile Apps
UX Design for Mobile AppsKamil Zieba
 
Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)Mobile App Design course (iOS & Android)
Mobile App Design course (iOS & Android)3sidedcube
 
TechTalk 77 UI & UX Presentation
TechTalk 77 UI & UX PresentationTechTalk 77 UI & UX Presentation
TechTalk 77 UI & UX PresentationEvan Purnama
 
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 productsKetut Sulistyawati
 
Mobile First Design Strategy & Process
Mobile First Design Strategy & ProcessMobile First Design Strategy & Process
Mobile First Design Strategy & ProcessSubhasish Karmakar
 
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 DesignerJamin Hegeman
 
Data in the city
Data in the cityData in the city
Data in the cityfrog
 
Ui ux designing principles
Ui ux designing principlesUi ux designing principles
Ui ux designing principlesDzung Nguyen
 
Introduction on Service Design
Introduction on Service DesignIntroduction on Service Design
Introduction on Service DesignValeria Grauso
 
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...Mind the Product
 
UX Experience Design: Processes and Strategy
UX Experience Design: Processes and StrategyUX Experience Design: Processes and Strategy
UX Experience Design: Processes and StrategyCHI UX Indonesia
 
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 ExperienceIngjerd Straand Jevnaker
 

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

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 developmetnTOPS Technologies
 
iPhone Programming [3/17] : Basic UI
iPhone Programming [3/17] : Basic UIiPhone Programming [3/17] : Basic UI
iPhone Programming [3/17] : Basic UIIMC Institute
 
Vb.net session 10
Vb.net session 10Vb.net session 10
Vb.net session 10Niit Care
 
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 3Manoj Ellappan
 
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 ReactOliver N
 
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...bhargavi804095
 
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 02Niit Care
 
Component interface
Component interfaceComponent interface
Component interfaceJAYAARC
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfCristina Vidu
 
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 AutomationDiana Gray, MBA
 
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 developmentZoltán Váradi
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0DivyaR219113
 

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

[Android] Multimedia Programming
[Android] Multimedia Programming[Android] Multimedia Programming
[Android] Multimedia ProgrammingNikmesoft Ltd
 
[Android] Android Animation
[Android] Android Animation[Android] Android Animation
[Android] Android AnimationNikmesoft Ltd
 
[Android] 2D Graphics
[Android] 2D Graphics[Android] 2D Graphics
[Android] 2D GraphicsNikmesoft Ltd
 
[Android] Services and Broadcast Receivers
[Android] Services and Broadcast Receivers[Android] Services and Broadcast Receivers
[Android] Services and Broadcast ReceiversNikmesoft Ltd
 
[Android] Web services
[Android] Web services[Android] Web services
[Android] Web servicesNikmesoft Ltd
 
[Android] Multiple Background Threads
[Android] Multiple Background Threads[Android] Multiple Background Threads
[Android] Multiple Background ThreadsNikmesoft Ltd
 
[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 ServicesNikmesoft Ltd
 
[Android] Data Storage
[Android] Data Storage[Android] Data Storage
[Android] Data StorageNikmesoft Ltd
 
[Android] Intent and Activity
[Android] Intent and Activity[Android] Intent and Activity
[Android] Intent and ActivityNikmesoft Ltd
 
[Android] Widget Event Handling
[Android] Widget Event Handling[Android] Widget Event Handling
[Android] Widget Event HandlingNikmesoft Ltd
 
[Android] Using Selection Widgets
[Android] Using Selection Widgets[Android] Using Selection Widgets
[Android] Using Selection WidgetsNikmesoft Ltd
 
[Android] Basic Widgets and Containers
[Android] Basic Widgets and Containers[Android] Basic Widgets and Containers
[Android] Basic Widgets and ContainersNikmesoft Ltd
 
[Android] Introduction to Android Programming
[Android] Introduction to Android Programming[Android] Introduction to Android Programming
[Android] Introduction to Android ProgrammingNikmesoft 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

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

[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/)