SlideShare a Scribd company logo
1 of 64
Download to read offline
iOS Basic Development
Day 2
Human Interface Design
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Slide
www.slideshare.net/eakkattiya
Source Code
www.ibluecode.com/training.html
Fan Page
www.ios-talk.com
twitter.com/eakkattiya
facebook.com/eakapong.kattiya
email : eak.k@ibluecode.com
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Eakapong Kattiya
Professional Mobile Application
Developer / Trainer
iOS & Android Platform
About
Wednesday, July 31, 13
Course Outline
1. Introduction Xcode & Language
2. Human Interface Design
3. UITableViewController & Datasource
4. Multimedia
5. Submit App Store
Course Outline
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Developing iOS Apps : Human Interface Design
• Focus on the primary task.
• Make usage easy and obvious.
• Use user-centric terminology.
• Make targets fingertip-size.
• De-emphasize settings.
• Use user interface (UI) elements consistently.
• Use subtle animation to communicate.
• Ask people to save only when necessary.
http://tinyurl.com/3de5ow8
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Organizing Content
- ผู้ใช้ส่วนใหญ่จะเข้าโปรแกรมเพื่อเรียก
ข้อมูลหรือทํางานสั้น ๆ แล้วก็จะออกจาก
โปรแกรม แต่จะมีการเข้าใช้งานบ่อย
- ไม่ทํางานหลายอย่างพร้อมกันต่อ
การกดปุ่มของผู้ใช้ 1 ครั้ง
- เน้นการแสดงข้อมูลของผู้ใช้เป็นหลัก
- ไม่ใช่การนําเอา Desktop มาย่อขนาด
หน้าจอ
Wednesday, July 31, 13
Developing iOS Apps :App Design
• ]
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UITabBarController & UINavigationBarController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UITabBarController
ทําหน้าที่สลับViewController หลาย ๆ ตัวไปมา
UITabBarItem ปุ่มของ
UITabBar สามารถแก้ไขได้
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
ใช้สําหรับแสดงViewController
เป็นลําดับชั้นไปเรื่อย ๆ โดยสามารถ
ย้อนกลับดูViewController ก่อนหน้าได้
UINavigationController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
BECTeroradio
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
ThailandYellowPages
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Thai M Service
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Assumption University
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
HIPKINGDOM
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
http://www.apple.com/ios/videos/#developers
http://pitchenvy.com
http://thumbsup.in.th
Idea for new app ?
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UINavigationController
- pushViewController
ใช้สําหรับเพิ่มViewController เข้าไปใน
UINavigationController
- popViewController
ใช้สําหรับลบViewController ออกจาก
UINavigationController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UINavigationItem
.rightBarButtonItem.leftBarButtonItem
.title
Wednesday, July 31, 13
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
CreateTabbed Application
Wednesday, July 31, 13
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
CreateTabbed Application : ShowCase
Wednesday, July 31, 13
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Choose Project Folder
Wednesday, July 31, 13
Storyboard : Select MainStoryboard_iPhone.storyboard
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Storyboard : Embed in Navigation Controller (FirstView)
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Storyboard : FirstTab Bar with Navigation Controller
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Storyboard : Embed In Navigation Controller (SecondView)
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Storyboard : SecondTab Bar with Navigation Controller
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Shared Application
เปิด Application ใน iPhone เช่น โทรศัพท์ ส่งข้อความ ส่งอีเมล์ safari google map youTube
Local File
เล่นไฟล์จากใน Bundle ของ Application เอง
Remote File
เล่นไฟล์จากบน Server
Http Live Streaming
เล่นไฟล์จากบน Server แบบ Streaming
* ต้องเป็นแบบ Http Live Streaming เท่านั้น ไม่สามารถใช้ RSTP หรือ Flash Streaming ได้
NSURL
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
NSURL *url = [NSURL URLWithString:@"tel:0866732111"];
TEL
NSURL *url = [NSURL URLWithString:@"sms:0866732111"];
SMS
NSURL *url = [NSURL URLWithString:@"mailto:eakkattiya@gmail.com"];
MAILTO
[[UIApplication sharedApplication] openURL:url];
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
NSURL *url = [NSURL URLWithString:@"http://www.sanook.com"];
SAFARI
NSURL *url = [NSURL URLWithString:@"http://maps.google.com/maps?
saddr=Current_Location@13.1234,100.1234&daddr=Destination@13.012
4,100.2234"];
GOOGLE MAP
[[UIApplication sharedApplication] openURL:url];
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
NSURL *url = [NSURL URLWithString:@"http://www.youtube.com/
watch?v=OGZe27ZBajE" ;
[[UIApplication sharedApplication] openURL:url];
YouTube
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Local File
NSURL *plistURL = [[NSBundle mainBundle] URLForResource:@"table"
withExtension:@"plist"];
NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"info"
withExtension:@"pdf"];
NSURL *movieURL = [[NSBundle mainBundle] URLForResource:@"movie"
withExtension:@"mp4"];
NSURL *musicURL = [[NSBundle mainBundle] URLForResource:@"music"
withExtension:@"mp3"];
NSURL
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Remote File
NSString *remoteFile = @"http://exclusivesiam.comeze.com/
exclusive_siam/imagesForIphone/Pororo%20opening-1.mp3"
NSURL *myURL = [NSURL URLWithString:remoteFile];
NSURL
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Http Live Streaming
NSString *liveStreaming = @"http://devimages.apple.com/iphone/
samples/bipbop/gear1/prog_index.m3u8"
NSURL *myURL = [NSURL URLWithString:liveStreaming];
NSURL
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
•HTTP
http://www.netdesign.ac.th
•PDF
Online - Offline pdf file
• Custom HTML Content
<html><body>Hello World</body>
</html>
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Class : UIWebView
Framework : UIKit
Sample Code : TransWeb
Init : Interface Builder
Property : scalesPageToFit
Method : loadRequest:
loadHTMLString:baseURL:
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
การเรียกใช้งาน HTTP
1. create UIWebView Outlet(Interface Builder)
2. set Delegate
3. create NSURL
4. create NSURLRequest
5. call loadRequest
@implementation WebViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *wwwURL = [NSURL URLWithString:@"http://www.sanook.com"];
NSURLRequest *request = [[NSURLRequest alloc]initWithURL:wwwURL];
[myWebView loadRequest:request];
}
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
การเรียกใช้งาน PDF
1. create UIWebView Outlet(Interface Builder)
2. set Delegate
3. create NSURL
4. create NSURLRequest
5. call loadRequest
@implementation WebViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"info"
withExtension:@"pdf"];
NSURLRequest *request = [[NSURLRequest alloc]initWithURL:pdfURL];
[myWebView loadRequest:request];
}
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
การเรียกใช้งาน HTML
1. create UIWebView Outlet(Interface Builder)
2. set Delegate
3. create HTML String
4. call loadHTMLString: baseURL:
@implementation WebViewController
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *myHTML =
@"<html><body><h1>Hello, world!</h1></body></html>";
[myWebView loadHTMLString:myHTML baseURL:nil];
}
UIWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Workshop
MyWebView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Property List
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
เป็นวิธีที่ช่วยให้เก็บข้อมูล ขนาดเล็ก อย่างง่าย
ในโครงสร้างแบบ XML โดยรองรับชนิดข้อมูล
■ Arrays
■ Dictionaries
■ Strings
■ numbers
■ dates
■ raw data
• NSUserDefaults class
ใช้โครงสร้างของ plist ในการเก็บข้อมูลเช่นกัน
Property List
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
■ ขนาดข้อมูลใหญ่กว่า 300 KB
■ ต้องการเก็บข้อมูลแบบ CustomType
■ ข้อมูลที่ซับซ้อน หลายชั้น
Property List
เมื่อไรที่ไม่ควรใช้ plist
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Property List : Root type NSArray , NSDictionary
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Name</key>
<string>John Doe</string>
<key>Phones</key>
<array>
<string>408-974-0000</string>
<string>503-333-5555</string>
</array>
</dict>
</plist>
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Class : UIScrollView
Framework : UIKit
Sample Code : UICatalog
Init : initWithFrame : (CGRect) or Interface Builder
Property : CGSize contentSize
float minimumZoomScale
float maximumZoomScale
BOOL pagingEnabled
Delegate : viewForZoomingInScrollView
UIScrollView
Wednesday, July 31, 13
UIScrollView
Gallery
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
การเรียกใช้งาน
1. Init UIScrollView
2. bind Delegate
3. กําหนด contentSize:(CGSize)size
4. กําหนด minimumZoomScale / maximumZoomScale
5. กําหนด pagingEnabled
6. ใช้ Delegate Zoom
viewForZoomingInScrollView
UIScrollView
Wednesday, July 31, 13
UIScrollView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
-(void)initScrollView
{
NSURL *url = [[NSBundle mainBundle] URLForResource:@"gallery"
withExtension:@"plist"];
NSArray *items = [NSArray arrayWithContentsOfURL:url];
UIScrollView *scv = [[UIScrollView alloc]initWithFrame:self.view.frame];
[scv setContentSize:CGSizeMake(320*items.count, 320)];
[scv setPagingEnabled:YES];
[self.view addSubview:scv];
NSInteger i = 0;
for(NSString *imageName in items){
UIImageView *imageView = [[UIImageView alloc] initWithImage:
[UIImage imageNamed:imageName]];
[imageView setFrame:CGRectMake(320*i, 0, 320, 320)];
[imageView setContentMode:UIViewContentModeScaleAspectFit];
[scv addSubview:imageView];
i++ ;
}
}
UIScrollView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UIAlertView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
-(void)showAlertView:(NSString*)title
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
message:@""
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
}
UIAlertView
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
iOS Basic Development
User Selection Design
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Social Share
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UIActionSheet
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)shareSocial:(id)sender {
UIActionSheet *action = [[UIActionSheet alloc]initWithTitle:@"Social Network"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Facebook",@"Twitter",
@"Instagram",@"Email", nil];
[action showInView:self.view];
}
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex == 0){
[self directShareFacebook:nil];
}
if(buttonIndex == 1){
[self directShareTwitter:nil];
}
if(buttonIndex == 2){
[self directShareInstagram:nil];
}
if(buttonIndex == 3){
[self directSendMail:nil];
}
}
UIActionSheet
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Social Framework
Facebook
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)directShareFacebook:(id)sender {
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *composeVC =
[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[composeVC setInitialText:self.myTextView.text];
UIImage *image = self.myImageView.image;
[composeVC addImage:image];
NSURL *url = [NSURL URLWithString:@"http://www.ibluecode.com"];
[composeVC addURL:url];
[self presentViewController:composeVC
animated:YES
completion:nil];
}
}
SLComposeViewController : Facebook
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Social Framework
Twitter
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)directShareTwitter:(id)sender {
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *composeVC =
[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[composeVC setInitialText:self.myTextView.text];
UIImage *image = self.myImageView.image;
[composeVC addImage:image];
NSURL *url = [NSURL URLWithString:@"http://www.ibluecode.com"];
[composeVC addURL:url];
[self presentViewController:composeVC
animated:YES
completion:nil];
}
}
SLComposeViewController :Twitter
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
UIDocumentInteractionController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)openDocumentAction:(id)sender {
NSURL *url = [[NSBundle mainBundle] URLForResource:@"mac_pro"
withExtension:@"jpeg"];
self.docController = [UIDocumentInteractionController interactionControllerWithURL:url];
self.docController.delegate = self ;
NSLog(@"uti: %@", [self.docController UTI]);
[self.docController presentOptionsMenuFromRect:self.view.frame
inView:self.view
animated:YES];
}
UIDocumentInteractionController :All
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)directShareInstagram:(id)sender {
NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"Image.igo"];
NSData *imageData = UIImagePNGRepresentation(self.myImageView.image);
[imageData writeToFile:savedImagePath atomically:YES];
NSURL *imageUrl = [NSURL fileURLWithPath:savedImagePath];
NSLog(@"%@",imageUrl);
UIDocumentInteractionController *docController = [UIDocumentInteractionController new];
docController.delegate = self;
docController.UTI = @"com.instagram.exclusivegram";
docController.URL = imageUrl;
[docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}else{
[self showAlertView:@"Please install Instagram before share."];
}
}
UIDocumentInteractionController : Instagram
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
MFMailComposeViewController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
- (IBAction)directSendMail:(id)sender {
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init];
mailVC.mailComposeDelegate = self;
[mailVC setSubject:@"Subject"];
NSArray *toRecipients = [NSArray arrayWithObjects:
@"eak.k@ibluecode.com",
@"eakkattiya@gmail.com", nil];
[mailVC setToRecipients:toRecipients];
UIImage *myImage = self.myImageView.image ;
NSData *imageData = UIImagePNGRepresentation(myImage);
[mailVC addAttachmentData:imageData mimeType:@"image/png" fileName:@"attachment"];
NSString *emailBody = self.myTextView.text;
[mailVC setMessageBody:emailBody isHTML:NO];
//iOS 5
//[self presentModalViewController:mailer animated:YES];
//iOS 6
[self presentViewController:mailVC animated:YES completion:nil];
}
}
MFMailComposeViewController
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13
Q & A
by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111
Wednesday, July 31, 13

More Related Content

Similar to (31 July 2013) iOS Basic Development Day 2 Human interface design

Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015gregorbyte
 
Smart, flipped, moodle and how they interact 2015
Smart, flipped, moodle and how they interact 2015Smart, flipped, moodle and how they interact 2015
Smart, flipped, moodle and how they interact 2015russechd
 
Martin Splitt "Progressive web apps with Polymer"
Martin Splitt "Progressive web apps with Polymer"Martin Splitt "Progressive web apps with Polymer"
Martin Splitt "Progressive web apps with Polymer"Fwdays
 
EduWeb - Building a Responsive Website for the Presidential Debate
EduWeb - Building a Responsive Website for the Presidential DebateEduWeb - Building a Responsive Website for the Presidential Debate
EduWeb - Building a Responsive Website for the Presidential DebateJon Liu
 
60 Apps in 60 Minutes - #NYCSTS13
60 Apps in 60 Minutes - #NYCSTS1360 Apps in 60 Minutes - #NYCSTS13
60 Apps in 60 Minutes - #NYCSTS13Christopher Casal
 
Coolhunting - ThinkVis 2012
Coolhunting - ThinkVis 2012 Coolhunting - ThinkVis 2012
Coolhunting - ThinkVis 2012 Steve Lock
 
Silicon Straits Foundry - Product Development Services Deck - 2014
Silicon Straits Foundry - Product Development Services Deck - 2014Silicon Straits Foundry - Product Development Services Deck - 2014
Silicon Straits Foundry - Product Development Services Deck - 2014Silicon Straits
 
Ck12 preso macul
Ck12 preso maculCk12 preso macul
Ck12 preso maculChris Scott
 
iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE Joquetta Johnson
 
Portfolio_SungKim_2015_digital
Portfolio_SungKim_2015_digitalPortfolio_SungKim_2015_digital
Portfolio_SungKim_2015_digitalSungjun Kim
 
53211830
5321183053211830
53211830Bu Bank
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayVMware Tanzu
 
Jalt2019 ar-morph - partial 7 slides
Jalt2019 ar-morph - partial 7 slidesJalt2019 ar-morph - partial 7 slides
Jalt2019 ar-morph - partial 7 slidesMasami YASUDA
 
01 GAIB Pune 2022 Session Rock Paper Scissors.pptx
01 GAIB Pune 2022 Session Rock Paper  Scissors.pptx01 GAIB Pune 2022 Session Rock Paper  Scissors.pptx
01 GAIB Pune 2022 Session Rock Paper Scissors.pptxicebeam7
 
Teaching computational thinking to primary pupils
Teaching computational thinking to primary pupilsTeaching computational thinking to primary pupils
Teaching computational thinking to primary pupilsJames Abela
 

Similar to (31 July 2013) iOS Basic Development Day 2 Human interface design (20)

Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015Build automation for XPages - AUSLUG 2015
Build automation for XPages - AUSLUG 2015
 
Smart, flipped, moodle and how they interact 2015
Smart, flipped, moodle and how they interact 2015Smart, flipped, moodle and how they interact 2015
Smart, flipped, moodle and how they interact 2015
 
Martin Splitt "Progressive web apps with Polymer"
Martin Splitt "Progressive web apps with Polymer"Martin Splitt "Progressive web apps with Polymer"
Martin Splitt "Progressive web apps with Polymer"
 
iCame! iSaw! iGoogled!
iCame! iSaw! iGoogled!iCame! iSaw! iGoogled!
iCame! iSaw! iGoogled!
 
EduWeb - Building a Responsive Website for the Presidential Debate
EduWeb - Building a Responsive Website for the Presidential DebateEduWeb - Building a Responsive Website for the Presidential Debate
EduWeb - Building a Responsive Website for the Presidential Debate
 
60 Apps in 60 Minutes - #NYCSTS13
60 Apps in 60 Minutes - #NYCSTS1360 Apps in 60 Minutes - #NYCSTS13
60 Apps in 60 Minutes - #NYCSTS13
 
Coolhunting - ThinkVis 2012
Coolhunting - ThinkVis 2012 Coolhunting - ThinkVis 2012
Coolhunting - ThinkVis 2012
 
Jalt2015
Jalt2015Jalt2015
Jalt2015
 
Silicon Straits Foundry - Product Development Services Deck - 2014
Silicon Straits Foundry - Product Development Services Deck - 2014Silicon Straits Foundry - Product Development Services Deck - 2014
Silicon Straits Foundry - Product Development Services Deck - 2014
 
Ck12 preso macul
Ck12 preso maculCk12 preso macul
Ck12 preso macul
 
Jalt2014
Jalt2014Jalt2014
Jalt2014
 
iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE iCame iSaw iGoogled - MDGAFE
iCame iSaw iGoogled - MDGAFE
 
Portfolio_SungKim_2015_digital
Portfolio_SungKim_2015_digitalPortfolio_SungKim_2015_digital
Portfolio_SungKim_2015_digital
 
53211830
5321183053211830
53211830
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario Gray
 
Jalt2019 ar-morph - partial 7 slides
Jalt2019 ar-morph - partial 7 slidesJalt2019 ar-morph - partial 7 slides
Jalt2019 ar-morph - partial 7 slides
 
01 GAIB Pune 2022 Session Rock Paper Scissors.pptx
01 GAIB Pune 2022 Session Rock Paper  Scissors.pptx01 GAIB Pune 2022 Session Rock Paper  Scissors.pptx
01 GAIB Pune 2022 Session Rock Paper Scissors.pptx
 
12206857
12206857 12206857
12206857
 
Teaching computational thinking to primary pupils
Teaching computational thinking to primary pupilsTeaching computational thinking to primary pupils
Teaching computational thinking to primary pupils
 
Native Slide
Native SlideNative Slide
Native Slide
 

More from Eakapong Kattiya

Android basic 4 Navigation Drawer
Android basic 4 Navigation DrawerAndroid basic 4 Navigation Drawer
Android basic 4 Navigation DrawerEakapong Kattiya
 
Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )Eakapong Kattiya
 
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework Eakapong Kattiya
 
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App StoreEakapong Kattiya
 
Iphone developer advance twitter
Iphone developer advance   twitterIphone developer advance   twitter
Iphone developer advance twitterEakapong Kattiya
 
iOS Advance Development - Social Media
iOS Advance Development - Social MediaiOS Advance Development - Social Media
iOS Advance Development - Social MediaEakapong Kattiya
 
Iphone developer advance location based
Iphone developer advance location basedIphone developer advance location based
Iphone developer advance location basedEakapong Kattiya
 

More from Eakapong Kattiya (9)

Android basic 4 Navigation Drawer
Android basic 4 Navigation DrawerAndroid basic 4 Navigation Drawer
Android basic 4 Navigation Drawer
 
Android basic 2 UI Design
Android basic 2 UI DesignAndroid basic 2 UI Design
Android basic 2 UI Design
 
Android basic 3 Dialogs
Android basic 3 DialogsAndroid basic 3 Dialogs
Android basic 3 Dialogs
 
Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )Evrdi : Social Diary ( iOS and Android )
Evrdi : Social Diary ( iOS and Android )
 
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
iOS Basic Development Day 2 - Objective-C 2.0 & iOS Framework
 
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
(1 July 2013) iOS Basic Development Day 5 - Submit to App Store
 
Iphone developer advance twitter
Iphone developer advance   twitterIphone developer advance   twitter
Iphone developer advance twitter
 
iOS Advance Development - Social Media
iOS Advance Development - Social MediaiOS Advance Development - Social Media
iOS Advance Development - Social Media
 
Iphone developer advance location based
Iphone developer advance location basedIphone developer advance location based
Iphone developer advance location based
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
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
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

(31 July 2013) iOS Basic Development Day 2 Human interface design

  • 1. iOS Basic Development Day 2 Human Interface Design by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 2. Slide www.slideshare.net/eakkattiya Source Code www.ibluecode.com/training.html Fan Page www.ios-talk.com twitter.com/eakkattiya facebook.com/eakapong.kattiya email : eak.k@ibluecode.com by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Eakapong Kattiya Professional Mobile Application Developer / Trainer iOS & Android Platform About Wednesday, July 31, 13
  • 3. Course Outline 1. Introduction Xcode & Language 2. Human Interface Design 3. UITableViewController & Datasource 4. Multimedia 5. Submit App Store Course Outline by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 4. Developing iOS Apps : Human Interface Design • Focus on the primary task. • Make usage easy and obvious. • Use user-centric terminology. • Make targets fingertip-size. • De-emphasize settings. • Use user interface (UI) elements consistently. • Use subtle animation to communicate. • Ask people to save only when necessary. http://tinyurl.com/3de5ow8 by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 5. Organizing Content - ผู้ใช้ส่วนใหญ่จะเข้าโปรแกรมเพื่อเรียก ข้อมูลหรือทํางานสั้น ๆ แล้วก็จะออกจาก โปรแกรม แต่จะมีการเข้าใช้งานบ่อย - ไม่ทํางานหลายอย่างพร้อมกันต่อ การกดปุ่มของผู้ใช้ 1 ครั้ง - เน้นการแสดงข้อมูลของผู้ใช้เป็นหลัก - ไม่ใช่การนําเอา Desktop มาย่อขนาด หน้าจอ Wednesday, July 31, 13
  • 6. Developing iOS Apps :App Design • ] by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 7. UITabBarController & UINavigationBarController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 8. UITabBarController ทําหน้าที่สลับViewController หลาย ๆ ตัวไปมา UITabBarItem ปุ่มของ UITabBar สามารถแก้ไขได้ by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 9. ใช้สําหรับแสดงViewController เป็นลําดับชั้นไปเรื่อย ๆ โดยสามารถ ย้อนกลับดูViewController ก่อนหน้าได้ UINavigationController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 10. BECTeroradio by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 11. ThailandYellowPages by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 12. Thai M Service by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 13. Assumption University by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 14. HIPKINGDOM by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 15. http://www.apple.com/ios/videos/#developers http://pitchenvy.com http://thumbsup.in.th Idea for new app ? by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 16. UINavigationController - pushViewController ใช้สําหรับเพิ่มViewController เข้าไปใน UINavigationController - popViewController ใช้สําหรับลบViewController ออกจาก UINavigationController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 18. by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 CreateTabbed Application Wednesday, July 31, 13
  • 19. by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 CreateTabbed Application : ShowCase Wednesday, July 31, 13
  • 20. by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Choose Project Folder Wednesday, July 31, 13
  • 21. Storyboard : Select MainStoryboard_iPhone.storyboard by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 22. Storyboard : Embed in Navigation Controller (FirstView) by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 23. Storyboard : FirstTab Bar with Navigation Controller by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 24. Storyboard : Embed In Navigation Controller (SecondView) by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 25. Storyboard : SecondTab Bar with Navigation Controller by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 26. Shared Application เปิด Application ใน iPhone เช่น โทรศัพท์ ส่งข้อความ ส่งอีเมล์ safari google map youTube Local File เล่นไฟล์จากใน Bundle ของ Application เอง Remote File เล่นไฟล์จากบน Server Http Live Streaming เล่นไฟล์จากบน Server แบบ Streaming * ต้องเป็นแบบ Http Live Streaming เท่านั้น ไม่สามารถใช้ RSTP หรือ Flash Streaming ได้ NSURL by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 27. NSURL *url = [NSURL URLWithString:@"tel:0866732111"]; TEL NSURL *url = [NSURL URLWithString:@"sms:0866732111"]; SMS NSURL *url = [NSURL URLWithString:@"mailto:eakkattiya@gmail.com"]; MAILTO [[UIApplication sharedApplication] openURL:url]; by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 28. NSURL *url = [NSURL URLWithString:@"http://www.sanook.com"]; SAFARI NSURL *url = [NSURL URLWithString:@"http://maps.google.com/maps? saddr=Current_Location@13.1234,100.1234&daddr=Destination@13.012 4,100.2234"]; GOOGLE MAP [[UIApplication sharedApplication] openURL:url]; by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 29. NSURL *url = [NSURL URLWithString:@"http://www.youtube.com/ watch?v=OGZe27ZBajE" ; [[UIApplication sharedApplication] openURL:url]; YouTube by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 30. Local File NSURL *plistURL = [[NSBundle mainBundle] URLForResource:@"table" withExtension:@"plist"]; NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"info" withExtension:@"pdf"]; NSURL *movieURL = [[NSBundle mainBundle] URLForResource:@"movie" withExtension:@"mp4"]; NSURL *musicURL = [[NSBundle mainBundle] URLForResource:@"music" withExtension:@"mp3"]; NSURL by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 31. Remote File NSString *remoteFile = @"http://exclusivesiam.comeze.com/ exclusive_siam/imagesForIphone/Pororo%20opening-1.mp3" NSURL *myURL = [NSURL URLWithString:remoteFile]; NSURL by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 32. Http Live Streaming NSString *liveStreaming = @"http://devimages.apple.com/iphone/ samples/bipbop/gear1/prog_index.m3u8" NSURL *myURL = [NSURL URLWithString:liveStreaming]; NSURL by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 33. UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 34. •HTTP http://www.netdesign.ac.th •PDF Online - Offline pdf file • Custom HTML Content <html><body>Hello World</body> </html> UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 35. Class : UIWebView Framework : UIKit Sample Code : TransWeb Init : Interface Builder Property : scalesPageToFit Method : loadRequest: loadHTMLString:baseURL: UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 36. การเรียกใช้งาน HTTP 1. create UIWebView Outlet(Interface Builder) 2. set Delegate 3. create NSURL 4. create NSURLRequest 5. call loadRequest @implementation WebViewController - (void)viewDidLoad { [super viewDidLoad]; NSURL *wwwURL = [NSURL URLWithString:@"http://www.sanook.com"]; NSURLRequest *request = [[NSURLRequest alloc]initWithURL:wwwURL]; [myWebView loadRequest:request]; } UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 37. การเรียกใช้งาน PDF 1. create UIWebView Outlet(Interface Builder) 2. set Delegate 3. create NSURL 4. create NSURLRequest 5. call loadRequest @implementation WebViewController - (void)viewDidLoad { [super viewDidLoad]; NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"info" withExtension:@"pdf"]; NSURLRequest *request = [[NSURLRequest alloc]initWithURL:pdfURL]; [myWebView loadRequest:request]; } UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 38. การเรียกใช้งาน HTML 1. create UIWebView Outlet(Interface Builder) 2. set Delegate 3. create HTML String 4. call loadHTMLString: baseURL: @implementation WebViewController - (void)viewDidLoad { [super viewDidLoad]; NSString *myHTML = @"<html><body><h1>Hello, world!</h1></body></html>"; [myWebView loadHTMLString:myHTML baseURL:nil]; } UIWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 39. Workshop MyWebView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 40. Property List by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 41. เป็นวิธีที่ช่วยให้เก็บข้อมูล ขนาดเล็ก อย่างง่าย ในโครงสร้างแบบ XML โดยรองรับชนิดข้อมูล ■ Arrays ■ Dictionaries ■ Strings ■ numbers ■ dates ■ raw data • NSUserDefaults class ใช้โครงสร้างของ plist ในการเก็บข้อมูลเช่นกัน Property List by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 42. ■ ขนาดข้อมูลใหญ่กว่า 300 KB ■ ต้องการเก็บข้อมูลแบบ CustomType ■ ข้อมูลที่ซับซ้อน หลายชั้น Property List เมื่อไรที่ไม่ควรใช้ plist by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 43. Property List : Root type NSArray , NSDictionary <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Name</key> <string>John Doe</string> <key>Phones</key> <array> <string>408-974-0000</string> <string>503-333-5555</string> </array> </dict> </plist> by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 44. Class : UIScrollView Framework : UIKit Sample Code : UICatalog Init : initWithFrame : (CGRect) or Interface Builder Property : CGSize contentSize float minimumZoomScale float maximumZoomScale BOOL pagingEnabled Delegate : viewForZoomingInScrollView UIScrollView Wednesday, July 31, 13
  • 45. UIScrollView Gallery by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 46. การเรียกใช้งาน 1. Init UIScrollView 2. bind Delegate 3. กําหนด contentSize:(CGSize)size 4. กําหนด minimumZoomScale / maximumZoomScale 5. กําหนด pagingEnabled 6. ใช้ Delegate Zoom viewForZoomingInScrollView UIScrollView Wednesday, July 31, 13
  • 47. UIScrollView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 48. -(void)initScrollView { NSURL *url = [[NSBundle mainBundle] URLForResource:@"gallery" withExtension:@"plist"]; NSArray *items = [NSArray arrayWithContentsOfURL:url]; UIScrollView *scv = [[UIScrollView alloc]initWithFrame:self.view.frame]; [scv setContentSize:CGSizeMake(320*items.count, 320)]; [scv setPagingEnabled:YES]; [self.view addSubview:scv]; NSInteger i = 0; for(NSString *imageName in items){ UIImageView *imageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:imageName]]; [imageView setFrame:CGRectMake(320*i, 0, 320, 320)]; [imageView setContentMode:UIViewContentModeScaleAspectFit]; [scv addSubview:imageView]; i++ ; } } UIScrollView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 49. UIAlertView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 50. -(void)showAlertView:(NSString*)title { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:@"" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alert show]; } UIAlertView by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 51. iOS Basic Development User Selection Design by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 52. Social Share by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 53. UIActionSheet by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 54. - (IBAction)shareSocial:(id)sender { UIActionSheet *action = [[UIActionSheet alloc]initWithTitle:@"Social Network" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Facebook",@"Twitter", @"Instagram",@"Email", nil]; [action showInView:self.view]; } -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex == 0){ [self directShareFacebook:nil]; } if(buttonIndex == 1){ [self directShareTwitter:nil]; } if(buttonIndex == 2){ [self directShareInstagram:nil]; } if(buttonIndex == 3){ [self directSendMail:nil]; } } UIActionSheet by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 55. Social Framework Facebook by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 56. - (IBAction)directShareFacebook:(id)sender { if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { SLComposeViewController *composeVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [composeVC setInitialText:self.myTextView.text]; UIImage *image = self.myImageView.image; [composeVC addImage:image]; NSURL *url = [NSURL URLWithString:@"http://www.ibluecode.com"]; [composeVC addURL:url]; [self presentViewController:composeVC animated:YES completion:nil]; } } SLComposeViewController : Facebook by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 57. Social Framework Twitter by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 58. - (IBAction)directShareTwitter:(id)sender { if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) { SLComposeViewController *composeVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; [composeVC setInitialText:self.myTextView.text]; UIImage *image = self.myImageView.image; [composeVC addImage:image]; NSURL *url = [NSURL URLWithString:@"http://www.ibluecode.com"]; [composeVC addURL:url]; [self presentViewController:composeVC animated:YES completion:nil]; } } SLComposeViewController :Twitter by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 59. UIDocumentInteractionController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 60. - (IBAction)openDocumentAction:(id)sender { NSURL *url = [[NSBundle mainBundle] URLForResource:@"mac_pro" withExtension:@"jpeg"]; self.docController = [UIDocumentInteractionController interactionControllerWithURL:url]; self.docController.delegate = self ; NSLog(@"uti: %@", [self.docController UTI]); [self.docController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES]; } UIDocumentInteractionController :All by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 61. - (IBAction)directShareInstagram:(id)sender { NSURL *instagramURL = [NSURL URLWithString:@"instagram://location?id=1"]; if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) { NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"Image.igo"]; NSData *imageData = UIImagePNGRepresentation(self.myImageView.image); [imageData writeToFile:savedImagePath atomically:YES]; NSURL *imageUrl = [NSURL fileURLWithPath:savedImagePath]; NSLog(@"%@",imageUrl); UIDocumentInteractionController *docController = [UIDocumentInteractionController new]; docController.delegate = self; docController.UTI = @"com.instagram.exclusivegram"; docController.URL = imageUrl; [docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES]; }else{ [self showAlertView:@"Please install Instagram before share."]; } } UIDocumentInteractionController : Instagram by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 62. MFMailComposeViewController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 63. - (IBAction)directSendMail:(id)sender { if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init]; mailVC.mailComposeDelegate = self; [mailVC setSubject:@"Subject"]; NSArray *toRecipients = [NSArray arrayWithObjects: @"eak.k@ibluecode.com", @"eakkattiya@gmail.com", nil]; [mailVC setToRecipients:toRecipients]; UIImage *myImage = self.myImageView.image ; NSData *imageData = UIImagePNGRepresentation(myImage); [mailVC addAttachmentData:imageData mimeType:@"image/png" fileName:@"attachment"]; NSString *emailBody = self.myTextView.text; [mailVC setMessageBody:emailBody isHTML:NO]; //iOS 5 //[self presentModalViewController:mailer animated:YES]; //iOS 6 [self presentViewController:mailVC animated:YES completion:nil]; } } MFMailComposeViewController by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13
  • 64. Q & A by Eakapong Kattiya www.ibluecode.com eak.k@ibluecode.com +66 086-673-2111 Wednesday, July 31, 13