Professional Documents
Culture Documents
Tai Lieu Huong Dan - Mobile-PC-Laptop PDF
Tai Lieu Huong Dan - Mobile-PC-Laptop PDF
MC LC
LI M U
Ngy nay xu hng s dng Smartphone v my tnh bng ang gia tng nhanh
chng trn th gii ni chung v Vit Nam ni ring, trong Vit Nam hin ang ng
th hai th gii v tc tng trng smartphone & my tnh bng vi tc tng trng
266%. Android, iOS, Windows Phone l nhng h iu hnh chy trn Smartphone v
my tnh bng ph bin nht th gii: Android 75%, iOS 17,3%, Windows Phone 3,2%.
Ti Vit Nam, theo nghin cu ca IDC, vo thi im qu 2/2013, iOS ang chim t l
1.6% trn tng s thit b phn phi ti Vit Nam, ng th ba sau Android v Windows
Phone.
Cng vi s tng trng ca Smartphone v cc h iu hnh chy trn Smartphone,
s lng ng dng cho cc h iu hnh ngy cng tng, tnh cho n ht nm 2012, s
lng ng dng iOS trn Apple App Store hn 775.000 ng dng v Google Play
c hn 700.000 ng dng.Vi s pht trin quy m ln ca ng dng, nhu cu tm hiu
v lp trnh ng dng cho cc h iu hnh cng tng dn.
Tuy nhin, thc tin cho thy, vic tm hiu cng nh tham gia cc lp hc v lp
trnh ng dng iPhone Vit Nam cn nhiu hn ch v kh khn.Cc lp dy lp trnh
ng dng iPhone ch mi xut hin nhiu trong thi gian gn y, do s lng vn cn
hn ch.
Bn cnh ngun ti liu ting Vit cn t, vic tm hiu v s dng cng c lp
trnh cng nh tham kho ti liu ting Anh v lp trnh ng dng iPhone i hi ngi
tm hiu phi tiu tn mt khong thi gian di cng nh c mt t hiu bit v lp trnh
v kh nng c hiu ting Anh tt. Hn na cc ti liu ting Vit do cc trung tm
ging dy lp trnh iPhone bin son ch lu hnh ni b, ngi tm hiu buc phi chi
mt khon tin tham d lp hc mi c th c c nhng ti liu ny.
Vi mong mun tm hiu cch xy dng ng dng iPhone c thm kin thc mi,
gip ch cho qu trnh lm vic sau khi ra trng cng nh gim bt nhng kh khn cho
ngi mi bt u tm hiu v lp trnh ng dng trn iPhone, nhm nghin cu thc
hin nghin cu, xy dng mt s ng dng trn iPhone da trn kin thc tm hiu c,
t tng hp v xy dng thnh ti liu Hng dn xy dng ng dng trn iPhone. Vi
nhng v d ring cho tng i tng, ngi c s d dng nm bt v hiu r cch s
dng, chc nng ca tng i tng khc nhau. Bn cnh ti liu cn km theo hng
dn chi tit tng bc xy dng mt vi ng dng thc t m nhm nghin cu
thc hin c trong qu trnh nghin cu. Hi vng rng ni dung ca ti liu ny s gip
ch phn no cho mi ngi khi bt u tm hiu v lp trnh iPhone, t c th tit
kim bt thi gian cho qu trnh tm hiu.
Mi kin ng gp xin lin lc qua email caothienmokimlong@gmail.com hoc
anhtiep20@gmail.com. Rt mong nhn c s gp chn thnh t mi ngi ti liu
hng dn ngy cng hon thin hn.
Nhm nghin cu
Nguyn Anh Tip Cao Thanh Vng
CHNG I
CHUN B TRC KHI BT U XY DNG NG DNG
Qu trnh chun b trc khi bt u lp trnh ng dng trn iPhone l qu trnh c
bn m bn phi chun b cho tht k lng. Qu trnh ny s chun b cho bn cc iu
kin cn thit c th thun li bt u tm hiu v lp trnh ng dng trn iPhone.
Trong chng ny, bn s c gii thiu s lc v qu trnh chun b, cc cch thc
bn c c h iu hnh Mac OS v b cng c Xcode. Hai iu kin ny l iu kin
cn thit bt u lp trnh iOS.
Tuy nhin ni dung phn chun b h iu hnh Mac OS ch c gii thiu s
lc vi bn cc cch thc c c mt h iu hnh Mac OS n nh (cch thc ci
t Mac OS trn thit b Intel/AMD) cho vic lp trnh ch khng i sau vo hng dn
c th bi iu thuc v mt lnh vc kin thc khc i hi phi o su tm hiu.
10
11
CHNG II
TM HIU XCODE V IOS SIMULATOR
Chng ny s mang n cho bn kin thc v b cng c Xcode cng nh cng c
gi lp h iu hnh iOS l iOS Simulator. Qua nhng kin thc c cung cp, bn s
nm r v giao din, mt s tnh nng, cc button v cng dng ca n trn Xcode v iOS
Simulator. Ngoi ra, bn s c hng dn mt s thao tc c bn khi s dng Xcode,
iOS Simulator t bn s d dng hn trong vic s dng b cng c ny trong qu
trnh lp trnh ng dng iPhone v sau.
14
Hnh 2.3 Ch g li
Hn th na, km theo Xcode l mt b ti liu hng dn tng bc, chi tit v
tin li nhm h tr ngi dng trong vic lp trnh. Trong qu trnh vit ng dng, nu
bn mun tm hiu thm mt i tng, bn c th s dng ti b ti liu ny c c
hng dn, v d minh ha d hiu.
16
17
18
20
- Find Navigator (
- Debug Navigator(
21
- Stop button (
- Scheme menu (
23
- Editor selector (
(cho php chia i Editor area ra lm hai hay ch l mt vng duy nht).
- View selector (
24
) v
hm trong ti liu km theo ca Xcode. Attribute cho php bn thay i cc thuc tnh
ca i tng.
Trong Library selector bar, c mt s button quan trng l Code snippets (
Objects (
),
chn s dng trong qu trnh vit ng dng. Objects hin th cc i tng ca Xcode cho
bn s dng thit k giao din ng dng.
25
26
27
29
Khi hp thoi hin ra, bn la chn loi kt ni cho i tng l Action hoc
Outlet. Hiu mt cch n gin, i tng no m bn s dng hin th thng tin ra
bn ngoi th thuc loi Outlet. i tng no m bn mun vit code khi tng tc
vi i tng s cho ra kt qu m bn mun ( v d bn mun nhn vo Button s
hin Hello World ) th bn s chn loi l Action. Mt i tng c th va l Action,
va l Outlet ty vo ngi vit ng dng quy nh.
31
).
33
Hnh 2.29 Ty chnh Font & Color cho giao din lp trnh code ca Xcode
Trong qu trnh vit chng trnh, bn cng c th s dng nt Quick Help trong
Utility area m ti liu tham kho v tra cu cc hm cng nh xem v d minh ha
cho cc hm.
2.1.6 Thc Thi V Kim Tra Li Ca ng Dng
2.1.6.1 Thc Thi ng Dng
Khi bn mun chy th v a ng dng ln iOS Simulator, bn s dng cc button
chuyn dng trn Toolbar. chy ng dng, trc tin bn phi chn la thit b m bn
mun chy ng dng ln . Bn c th chn chy ln thit b tht hoc trn iOS
Simulator. Trong iOS Simulator, ty theo ng dng ca bn vit cho thit b no m la
chn thit b , v d iPad, iPhone, iPhone Rentina
34
36
37
38
39
42
43
45
Sau chn v tr mun Paste chui trong iOS Simulator > Double-click vo v tr
hin ra nt Paste > chn Paste.
47
CHNG III
NGN NG OBJECTIVE-C
Mc d Xcode h tr nhiu ngn ng trong vic lp trnh ng dng trong iPhone, nhng
ng vai tr ch yu nht vn l ngn ng Objective-C bi s thn thin, d s dng ca
n. Chng ny s hng dn bn mt s nt c bn ca ngn ng lp trnh Objective-C
vi hi vng bn s nm c s lc cch s dng, c php ca ngn ng ny thun
tin hn trong vic xy dng ng dng. Ni dung chng s trnh by s lc mt s vn
sau ca ngn ng Objective-C:
Khai bo bin
Kiu d liu
Cc php ton
Hm (Function)
Cu trc iu kin
Cu trc lp
Mng
Chui
3.2.2 Quy Tc t Tn
Quy tc t tn bin:
- Ngn ng Objective-C c phn bit hoa thng.
- Tn bin khng c du ting vit.
- Tn bin khng c khong trng.
- Tn bin khng c bt u bng s.
- Tn bin khng c c cc k t c bit (ngoi tr du gch di _)
- Tn bin khng c t trng vi cc t kho ca ngn ng objective-C. VD:
void, if, static, ...
3.3 KIU D LIU
Kiu d liu s gip trnh bin dch xc nh c loi d liu (s nguyn, s thc,
chui,) m chng ta mun lu tr l g t s cp pht lng b nh tng ng vi
loi d liu m chng ta cn lu tr. Objective-C h tr cc kiu d liu c bn nh sau:
Loi d liu
Tn kiu
S nh
Min gi tr
K t
char
1 byte
-128 .. 127
unsigned char
1 byte
0 .. 255
int
4 bytes
- 2147483648 .. 2147483647
unsigned int
4 bytes
0 .. 4294967295
short
2 bytes
-32768 .. 32767
unsigned short
2 bytes
0 .. 65535
long
4 bytes
-2147483648 .. 2147483647
unsigned long
4 bytes
0 .. 4294967295
long long
8 bytes
-9,223,372,036,854,775,808 ..
S nguyn
50
9,223,372,036,854,775,807
S thc
Logic
8 bytes
0 .. 18,446,744,073,709,551,615
float
4 bytes
0 .. 3.4028235e+38
double
8 bytes
0 .. 1.7976931E+308
Long double
16 bytes
0 .. 1.1897315E+509
BOOL
1 bytes
K hiu
V d
Cng
A+B
Tr
AB
Nhn
A*B
Chia
A/B
Ly phn d
M%N
51
V d
Cc k t cn in
LacHong University
Cc k t c bit bt u bi du \
\n
: xung dng;
\t
: k t Tab;
\\
: k t \
\;
: k t ;
: du
%m_kiu_d_liu
(kiu float l f; kiu int l d hay i)
52
53
3.7 FUNCTION
3.7.1 nh Ngha
Function L tp hp cc dng code, gom thnh 1 khi. Khi code ny c t tn.+
Khi code ny ch c thc thi khi tn khi code c gi.
3.7.2 Phng Thc Khng C Tham S Truyn Vo
Khai bo:
- (kiu_hm) tn_hm
{
//cc cu lnh
[return [biu_thc];]
}
Trong :
- Du - i din cho loi phng thc m ta phi gi n thng qua i tng
ca lp cha ng phng thc .
- Kiu hm: l kiu ca <biu thc> trong lnh return.
- Tn hm: do chng ta t ngh ra
VD:
54
55
56
//Cng vic 2
}
3.8.3 Cu Lnh Switch - Case
C php
switch ( biu_thc)
{
case hng_1: [cng_vic_1]
case hng_2: [cng_vic_2]
...
case hng_n: [cng_vic_n]
default: [cng_vic_n+1]
}
Trong
- Biu thc v hng kiu s nguyn
- Lnh break thot khi switch
VD:
58
while (iu_kin_lp)
{
//Cng vic
}
Trong :
- Khi <iu_kin_lp> cn ng th cn thc hin <cng_vic>. Vng lp kt
thc khi <iu_kin_lp> sai.
VD:
60
61
62
Kt qu
64
Hnh 3.29 Ly cc k t cn li t v tr n
Kt qu
Hnh 3.30 Kt qu ly cc k t cn li t v tr n
65
67
68
69
70
71
CHNG IV
MT S THAO TC C BN
Trc khi bt u lp trnh ng dng trn iPhone, ngoi vic bn tm hiu v
Xcode v iOS Simulator, bn cn phi tm hiu thm mt s thao tc c bn trong lp
trnh iOS. Hiu bit v cc thao tc c bn ny s b tr cho bn trong qu trnh tm hiu,
cng nh l bi hc v lng trc khi i su vo tm hiu cc i tng c bn trong
Xcode chng sau. Ni dung chng ny gm mt s thao tc c bn nh:
Thay i icon ca ng dng
Thay i mn hnh khi ng dng va c m ln
Thay i tn ng dng khi tn c qu di
Ty chnh background
Thm mi mt framework
n thanh trng thi status bar
73
74
76
77
79
80
81
82
83
CHNG V
MT S I TNG C BN
Chng ny trnh by mt s i tng c bn thng c s dng vit ng
dng cho iOS. Qua chng ny, bn c th nm c chc nng cng nh cch s dng
mt s i tng c bn, t c th vn dng vo vit ng dng. Do kh nng ca
ngi vit cn gii hn nn s i tng c gii thiu trong chng ny vn cn hn
ch. Bn c th tm hiu thm nhiu i tng khc, tm hiu su hn tng i tng
bng cch truy cp vo hng dn ca Apple cho ngi lp trnh a ch sau:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKit
UICatalog/index.html
88
90
93
94
5.2.5 V D
Bc 1: khi ng firefox, vo SQLite Manager
99
100
Hnh 5.30 Kt qu
Bc 5: to project mi sqlite
101
104
Hnh 5.39 Kt qu nh x
Bc 11: vit code trong hm View Didload ly ng dn ti tp tin sqlite.
106
108
Hnh 5.47 Kt qu
5.3 S DNG CAMERA IPHONE
5.3.1 Gii Thiu
Phn ny s hng dn cc bn cch s dng th vin h tr ca iOS dng
camera iPhone chp nh. Th vin iOS cung cp mt lp l UIImagePickController dng
qun l vic tng tc vi camera hoc photo library. Tuy nhin
UIImagePickController khng th s dng trc tip m cn ti mt i tng khc
delegate (tha k) li n. Sau y chng ta s xy dng mt ng dng n gin dng
camera chp nh. Giao din ca ng dng ny gm mt UIImageView hin th hnh
nh, mt button tn l Chp nh.
5.3.2 V D
To ng dng mi t tn l CameraApp.
109
110
\
Hnh 5.51 nh x i tng
111
Hnh 5.52 Kt qu
Trong ViewController, thm on code sau tha k li UIImagePickController.
112
.
Hnh 5.57 i tng UIImage
113
Tn file m rng
.tiff, .tif
.jpg, .jpeg
.gif
.png
.bmp, .bmpf
.ico
.cur
.xbm
5.4.3 V D
Hin th nh t mt file c sn trn my.
Bc 1: Add UIImageView vo StoryBoard.
Chn Main.storyboard
115
116
117
Hnh 5.70 Kt qu
Lu : phng thc viewDidLoad s c gi mi khi chng ta m ng dng.
118
Hnh 5.72 Kt qu
Hin th nh t mt URL:
S dng phng thc initWithData load ni dung t url.
119
Hnh 5.76 Kt qu
120
Din gii
Tiu ca Alert View.
Ni dung thng bo
i tng nhn gi tr t UIAlertView.
Kiu ca 1 Alert View khi hin th trn ng dng
Tr v s lng buttons c trn Alert View
V tr index ca button Cancel trn UIAlertView
Gi tr ca nt u tin trong UIAlertView, mc
nh l 0.
121
Din gii
Gn tiu cho Alert View
Ly tiu ca button ti v tr index
Ly ni dung ca textField ti v tr index
Gi 1 Alert View
Hu 1 UIAlertView
5.5.3 V D
Hin th AlerView dng thng bo.
122
123
126
127
131
Hnh 5.104 Kt qu
5.8 ACTIVITY INDICATOR VIEW
5.8.1 Gii Thiu
Activity Indicator View l mt i tng thng bo ch i cho ngi dng.
132
133
Bc 5: Qua giao din thit lp thuc tnh Hides When Stopped cho i tng
Activity Indicator View.
Hnh 5.110 Kt qu
135
5.9 ACTIONSHEET
5.9.1 Gii Thiu
Action Sheet Cho php ngi dng xc nhn cc hnh ng trn
ViewController.
}
- (IBAction)touchBtn:(id)sender;
@end
137
138
#import <MapKit/MapKit.h>
Chy th, kt qu:
141
Hnh 5.124 Kt qu
142
143
Gii thch: phng thc ny cho php chng ta thit lp s dng trong 1 Section,
y chnh l s phn t ca mng
Bc 7: ti phng thc cellForRowAtIndexPath bn di // Configure the
cell... thm on code sau hin th tn sinh vin ln Table View Controller:
NSInteger row = indexPath.row;
cell.textLabel.text = mangSinhVien[row];
Bc 8: Cmd + r chy th, kt qu:
Hnh 5.130 Kt qu
5.12 SEARCH BAR
5.12.1 Gii Thiu
Search Bar c s dng tm kim trong Table View Controller.
147
151
Hnh 5.134 Kt qu
5.13 TRUYN D LIU GIA CC VIEW
5.13.1 Gii Thiu
truyn d liu qua li gia cc View Controller trong mt ng dng,
NSUserDefaults l mt lp c cc phng thc h tr lm iu ny.
5.13.2 V D
Bc 1: Thit k giao din cho nh sau v Map (Outlet) i tng textField vi tn
txtHoTen.
152
153
Hnh 5.141 Kt qu
156
CHNG VI
HNG DN XY DNG PHN MM
Qua cc ni dung cc chng trc, chc hn bn nm c cch thc xy
dng mt ng dng, cng nh hiu v s dng c mt s i tng trong Xcode vo
thit k v xy dng ng dng trn iPhone. Tuy nhin b sung, cng c li kin thc
cho bn, cng nh gip bn c th t lm c mt ng dng hon chnh t c bn n
nng cao, nhm tc gi s gii thiu n bn qu trnh thit k v xy dng hai ng dng
hon chnh da trn cc i tng trong Xcode c gii thiu h thng li kin
thc m ti liu cung cp, cng nh cho bn lm quen vi vic xy dng ng dng
hon chnh.
Hai ng dng trong chng ny s c gii thiu v hng dn mt cch chi tit
qu trnh thit k v xy dng bn c th thc hin theo mt cch d dng. Hi vng
rng sau khi thc hin xong hai ng dng ny, bn c th t tm tng v xy dng
nn ng dng ring cho mnh.
X l nhn din m VIN trong hnh nh s dng OCR SDK API ca hng
ABBYY. Hnh nh s c a ln server, server s x l nhn din v tr v mt on
text nhn din c t hnh nh. Phn mm s x l on text tr v t server tch m
VIN ra v a vo SQLite tra cu d liu.
6.1.4 C Ch Vn Hnh
Phn mm hot ng theo hai c ch chnh. C ch th nht l ngi dng s nhp
vo m VIN bng tay, chng trnh s khi to cc cu lnh truy vn SQL v gi n
SQLite truy xut d liu v em kt qu hin th ra giao din.
C ch th hai s cho php ngi dng s dng camera ca iPhone chp li m
VIN v a hnh nh ln OCR Server. Server s x l v tr v mt on text kt qu
sau khi nhn din k t trong hnh nh. Phn mm s phi x l on text tr v lc ra
c m VIN. Nu hnh nh chnh xc, m VIN s c ly ra v to cu lnh truy vn
gi n SQLite. SQLite s truy xut d liu v tr v kt qu. Kt qu s hin th ra giao
din.
160
162
163
Bc 1: To project mi.
164
Chn v tr lu project.
167
169
170
171
Trong
[1] Ko mt label vo v nhp ni dung nh hnh.
[2] Ko mt text field ngi dng nhp m VIN vo
[3] Ko button vo sao cho khi click vo button Xem s tin hnh kim tra m VIN
c nhp vo v a n View Controller Kt Qu. Nu click vo Camera s chuyn
n view Camera, click vo Quay li s v giao din chnh.
Thm mt class mi qun l Nhp M Vin
173
Kt qu sau khi to
Hnh 6.33 Kt qu
Chn View Controller Nhp M VIN, bn khung Inspector pane, chn tab
Identity Inspector.
175
177
181
184
185
186
188
190
nh x cc i tng vo KQVIN
194
196
197
199
Trong tp tin AppleDelegate.m vit code sau cc View khc c th truy xut
imageToProcess d dng.
202
203
Trong
- [1] Label hin tn ca viewController Nhn Din.
- [2] Label hin th trng thi x l ca viewController.
- [3] Mt Activity Indicator hin trng thi ang x l.
Thm mt class mi l NhanDien qun l viewcontroller mi.
205
Vit hm viewDidAppear
211
213
cc k t c bit thnh khong trng, sau tin hnh bc tch m VIN t chui
chun ha.
215
216
219
221
223
Hnh 6.156 Cc tnh nng trn giao din thng tin chi tit ca ni tm kim
kim
tm kim
web.
226
Bc 1: To project
M XCode chn Single View Application
227
228
229
230
231
233
234
235
Khung bn tri gc trn click phi chut vo Project New file (phm tt
Cmd + N).
237
238
Hnh 6.182 Kt qu
Add lp va to HomeViewController vo TableViewController.
239
240
Kt qu:
Hnh 6.188 Kt qu
To mt Group tn Classes tin qun l, phi chut vo project New
Group nhp Classes.
Hnh 6.191 Kt qu
M Place.h khai bo cc thuc tnh lit k pha trn(Cch khai bo cc
thuc tnh ny tng t nh getter/ setter ca C# hoc java).
244
245
Hnh 6.193 Kt qu
246
yu cu vit thng)
return [[NSMutableArray alloc] initWithObjects:
[self setPlace:@"atm.png" titleEn:@"ATM" titleVi:@"ATM" placeType:@"establishment"
keyWord:@"atm"],
[self setPlace:@"bank.png" titleEn:@"Bank" titleVi:@"Ngn hng"
placeType:@"establishment" keyWord:@"bank"],
[self setPlace:@"school.png" titleEn:@"School" titleVi:@"Trng hc"
placeType:@"establishment" keyWord:@"school"],
[self setPlace:@"bar.png" titleEn:@"Bar" titleVi:@"Bar" placeType:@"establishment"
keyWord:@"bar"],
[self setPlace:@"coffee_shops.png" titleEn:@"Cafe" titleVi:@"Cafe"
placeType:@"establishment" keyWord:@"cafe"],
[self setPlace:@"karaoke.png" titleEn:@"Karaoke" titleVi:@"Karaoke"
placeType:@"establishment" keyWord:@"karaoke"],
[self setPlace:@"bus_station.png" titleEn:@"Bus station" titleVi:@"Trm xe but"
placeType:@"bus_station" keyWord:@""],
[self setPlace:@"gas_station.png" titleEn:@"Gas station" titleVi:@"Trm xng"
placeType:@"gas_station" keyWord:@"station"],
[self setPlace:@"supermarket.png" titleEn:@"Supermarket" titleVi:@"Siu th"
placeType:@"establishment" keyWord:@"supermarket"],
[self setPlace:@"restaurant.png" titleEn:@"Restaurant" titleVi:@"Nh hng"
placeType:@"establishment" keyWord:@"restaurant"],
[self setPlace:@"lodging.png" titleEn:@"Hotel" titleVi:@"Khch sn"
placeType:@"establishment" keyWord:@"hotel"],
[self setPlace:@"park.png" titleEn:@"Park" titleVi:@"Cng vin"
placeType:@"establishment" keyWord:@"park"],
[self setPlace:@"movie_theater.png" titleEn:@"Movie theater" titleVi:@"Rp chiu"
placeType:@"establishment" keyWord:@"movie theater"],
[self setPlace:@"computer.png" titleEn:@"Computer store" titleVi:@"My tnh"
placeType:@"establishment" keyWord:@"computer"],
[self setPlace:@"post_office.png" titleEn:@"Post office" titleVi:@"Bu in"
placeType:@"establishment" keyWord:@"post_office"],
[self setPlace:@"train_station.png" titleEn:@"Train station" titleVi:@"Ga xe la"
placeType:@"train_station" keyWord:@""],
[self setPlace:@"airport.png" titleEn:@"Airport" titleVi:@"Sn bay" placeType:@"airport"
keyWord:@""],
[self setPlace:@"bakery.png" titleEn:@"bakery" titleVi:@"Tim bnh"
placeType:@"establishment" keyWord:@"bakery"],
[self setPlace:@"beauty_salon.png" titleEn:@"Beauty salon" titleVi:@"Lm p"
placeType:@"establishment" keyWord:@"beauty_salon"],
[self setPlace:@"spa.png" titleEn:@"Spa" titleVi:@"Spa" placeType:@"establishment"
keyWord:@"spa"],
[self setPlace:@"hair.png" titleEn:@"Hair care" titleVi:@"Tim un c"
placeType:@"establishment" keyWord:@"hair"],
[self setPlace:@"book_store.png" titleEn:@"Book Store" titleVi:@"Nh sch"
248
placeType:@"establishment" keyWord:@"book_store"],
[self setPlace:@"cemetery.png" titleEn:@"Cemetery" titleVi:@"Ngha trang"
placeType:@"establishment" keyWord:@"cemetery"],
[self setPlace:@"church.png" titleEn:@"Church" titleVi:@"Nh th"
placeType:@"establishment" keyWord:@"church"],
[self setPlace:@"clothing_store.png" titleEn:@"Clothing store" titleVi:@"Qun o"
placeType:@"establishment" keyWord:@"clothing_store"],
[self setPlace:@"shoe_store.png" titleEn:@"Shoe store" titleVi:@"Dy dp"
placeType:@"establishment" keyWord:@"shoe_store"],
[self setPlace:@"convenience_store.png" titleEn:@"Convenience store" titleVi:@"Tim
tp ho" placeType:@"establishment" keyWord:@"convenience_store"],
[self setPlace:@"electronics_store.png" titleEn:@"Electronics store" titleVi:@"in t"
placeType:@"electronics_store" keyWord:@""],
[self setPlace:@"furniture_store.png" titleEn:@"Furniture store" titleVi:@"Ni tht"
placeType:@"establishment" keyWord:@"furniture_store"],
[self setPlace:@"sport.png" titleEn:@"Sport store" titleVi:@"Th thao"
placeType:@"establishment" keyWord:@"sport"],
[self setPlace:@"hospital.png" titleEn:@"Hospital" titleVi:@"Bnh vin"
placeType:@"establishment" keyWord:@"hospital"],
[self setPlace:@"pharmacy.png" titleEn:@"Pharmace" titleVi:@"Tim thuc"
placeType:@"establishment" keyWord:@"pharmacy"],
[self setPlace:@"library.png" titleEn:@"Library" titleVi:@"Th vin"
placeType:@"establishment" keyWord:@"library"],
[self setPlace:@"museum.png" titleEn:@"Museum" titleVi:@"Bo tng"
placeType:@"establishment" keyWord:@"museum"],
[self setPlace:@"parking.png" titleEn:@"Parking" titleVi:@"Bi xe"
placeType:@"establishment" keyWord:@"parking"],
[self setPlace:@"police.png" titleEn:@"Police" titleVi:@"Cnh st" placeType:@"police"
keyWord:@""],
[self setPlace:@"real_estate_agency.png" titleEn:@"Real estate agency" titleVi:@"Bt
ng sn" placeType:@"establishment" keyWord:@"real_estate_agency"],
[self setPlace:@"stadium.png" titleEn:@"Stadium" titleVi:@"Sn vn ng"
placeType:@"establishment" keyWord:@"stadium"],
[self setPlace:@"travel_agency.png" titleEn:@"Travel agency" titleVi:@"V my bay"
placeType:@"establishment" keyWord:@"travel agency"],
[self setPlace:@"veterinary_care.png" titleEn:@"Veterinary care" titleVi:@"Th y"
placeType:@"establishment" keyWord:@"veterinary care"],
[self setPlace:@"zoo.png" titleEn:@"Zoo" titleVi:@"S th" placeType:@"zoo"
keyWord:@""],
[self setPlace:@"car_dealer.png" titleEn:@"Car dealer" titleVi:@"i l xe hi"
placeType:@"car_dealer" keyWord:@""],
nil];
}
Gii thch:
249
Kt qu:
Hnh 6.194 Kt qu
Khai bo 1 mng arrPlaces bn di @implementation
HomeViewController:
@implementation HomeViewController
NSMutableArray *arrPlaces;
250
Kt qu:
Hnh 6.195 Kt qu
Sau khi in th m ra c kt qu nh trn, n y tm n, xo hm in th v
chng ta khng cn na, kt qu hm viewDidLoad:
- (void)viewDidLoad
251
{
[super viewDidLoad];
//Gi phng thc getArrPlaces v gn kt qu vo mng arrPlaces
arrPlaces = [PlaceManager getArrPlaces];
}
252
254
Gii thch:
- Mi Column ca chng ta s l 1 button do chng ta cn s dng
[[UIButton alloc] initWithFrame] khi to 1 button.
- CGRectMake: hm ny s xc nh v tr, kch thc ca mt button gm cc
tham s (l tri, l trn, rng, chiu cao).
M file HomeViewController.m, hm numberOfSectionsInTableView sa 0
thnh 1:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 0;
}
Hm numberOfRowsInSection sa li nh sau:
255
257
Hnh 6.200 Th mc ti v
Ko th th mc images bn trong project vo XCode:
258
259
- (void)clickButtons:(id)sender {
int selected = [self selectedIndex:sender];
NSLog(@"%i.%@",selected, [arrPlaces[selected] titleVi]);
}
Hnh 6.204 Kt qu
Bc 5: Xy dng View Controller FindingPlaceViewController
FindingPlaceViewController s hin th kt qu tm kim c t Google nh
sau:
262
263
265
Gii thch:
- location: bt u tm kim ti v tr no. VD: 10.953212,106.802378
- Radius: tm kim trong phm vi khong cch l bao nhiu (meters). VD: 400
met
- Types: loi ni cn tm, nhng loi ni ny do Google nh ngha. VD:
establishment, school, hostpital, atm,... Tham kho ti
https://developers.google.com/places/documentation/supported_types.
Kt qu:
Hnh 6.216 Kt qu
M Google.h khai bo cc phng thc sau:
//nh ngha 1 API Key
#define GOOGLE_API_KEY @"AIzaSyBKBekY4nxGHKh6wGqCtNGtMJRbl7FmTKM"
#import <Foundation/Foundation.h>
//Thm th vin <CoreLocation/CoreLocation.h> s dng CLLOcationCoordinate2D
//(y l mt kiu d d liu strut gm v (latitude) v kinh (longitude)
#import <CoreLocation/CoreLocation.h>
@interface Google : NSObject
//phng thc searchPlaces tm cc a im xung quanh
+ (NSDictionary *)searchPlaces:(CLLocationCoordinate2D )coordinate
radius:(NSString *)radius
placeType:(NSString *)placeType
keyword:(NSString *)keyword;
268
Chn MainStoryboard.storyboard ko th mi tn t
NavigationController qua FindingPlaceViewController chy th
FindingPlaceViewController:
Gii thch:
- Phng thc getDestinations s ly ra tt c cc to trong mng m
searchPlacesFromGoogle tr v, sau ghp cc to ny li thnh 1
chui cc to phn cch nhau bi du |.
VD:
10.970549,106.915440|10.980949,106.915440|10.970549,106.915440|10.9809
49,106.915440 hoc NULL
- Da vo to gc v chui to nh trn, hm
searchDistancesFromGoogle s request ti Google v nhn v ti liu json
cha cc khong cch, sau searchDistancesFromGoogle s chuyn json
v thnh mng v tr mng v. C th hm searchDistancesFromGoogle
s thc thi HTTP URL sau ca Google:
http://maps.googleapis.com/maps/api/distancematrix/json?origins=10.953212,
106.802378&destinations=10.970549,106.915440|10.980949,106.915440|10.9
70549,106.915440|10.980949,106.915440&mode=walking&units=imperial&s
ensor=true
275
Kt qu:
Kt qu:
276
277
278
objectForKey:@"text"];
[arrPlaceSearching addObject:ps];
}
}
return arrPlaceSearching;
}
Kt qu:
Hnh 6.225 Kt qu tr v
280
Sa li 2 hm numberOfSectionsInTableView v
numberOfRowsInSection nh sau:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return arrPlaceSearching.count;
}
Ti hm cellForRowAtIndexPath sa li nh sau:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath
*)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier
forIndexPath:indexPath];
int row = indexPath.row;
PlaceSearching *ps = [[PlaceSearching alloc] init];
ps = arrPlaceSearching[row];
// Configure the cell...
//Set name
UILabel *lblName = [self createLabel:CGRectMake(5, 5, 310, 20) font:@"Arial-BoldMT"
size:17 text:ps.name];
[cell.contentView addSubview:lblName];
//Set vicinity
UILabel *lblVicinity = [self createLabel:CGRectMake(5, 25, 290, 20) font:@"Arial" size:14
text:ps.vicinity];
281
[cell.contentView addSubview:lblVicinity];
//Set numbers
UILabel *lblNumbers = [self createLabel:CGRectMake(0, 48, 320, 10) font:@"Arial" size:10
text:[NSString stringWithFormat:@"%i",row+1]];
lblNumbers.textAlignment = NSTextAlignmentCenter;
[cell.contentView addSubview:lblNumbers];
//Set Distance (kilometers)
UILabel *lblDistance = [self createLabel:CGRectMake(260, 46, 60, 15) font:@"Arial" size:13
text:ps.units];
[cell.contentView addSubview:lblDistance];
return cell;
}
282
283
285
286
287
288
290
Hnh 6.243 Kt qu
Qua file MapViewController.m chng ta s thy c 3 phng thc mi xut
hin:
291
292
294
295
Hnh 6.253 Kt qu
296
Tin hnh import MapKit.h bng cch click vo project Tab Buil Phases
Tab Link Binary With Libraries
#import <MapKit/MapKit.h>
299
Gii thch:
- Coordinate: gi to ca Annotation
- Title: Tiu cho Annotation
- Subtitle: Ni dung cho Annotation
ly ra to hin ti chng ta khai bo thm bin locationManager trong
file MapViewController.h bn di IBOutlet UIToolbar *toolBar;
CLLocationManager *locationManager;
Kt qu file MapViewController.h:
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface MAPViewController : UIViewController
<CLLocationManagerDelegate>
{
IBOutlet MKMapView *myMapView;
IBOutlet UIButton *btnExitFullScreen;
IBOutlet UIToolbar *toolBar;
CLLocationManager *locationManager;
}
301
- (IBAction)touchBtnGPS:(id)sender;
- (IBAction)touchBtnMap:(id)sender;
- (IBAction)touchBtnFullScreen:(id)sender;
@end
Ti viewDidLoad in th v tr nh sau:
- (void)viewDidLoad
302
{
[super viewDidLoad];
[self startLocation];
NSLog(@"%@",locationManager.location);
}
Kt qu:
Hnh 6.262 Kt qu in th
Da vo to hin ti 37.33233141, -122.03121860, in ra 1 Annontation
mt v tr no gn vi to hin ti.
VD: 37.43233141, -122.13121860. M file MapViewController.m Import lp
Annotation to trc :
#import "Annotation.h"
- (void)viewDidLoad
{
[super viewDidLoad];
[self startLocation];
[self addAnnotation:@"37.43233141"
longitude:@"-122.03121860"
title:@"Nguyen Anh Tiep"
subtitle:@"47 E/10 KP.9, P.Tan Hoa, BH-DN"];
}
Kt qu:
break;
case 1:
myMapView.mapType = MKMapTypeSatellite;
break;
case 2:
myMapView.mapType = MKMapTypeHybrid;
break;
default:
break;
}
}
M MapViewController.m ti hm touchBtnFullScreen:
- (IBAction)touchBtnFullScreen:(id)sender {
btnExitFullScreen.hidden = NO;
toolBar.hidden = YES;
}
M MapViewController.m ti hm touchBtnExitFullScreen:
- (IBAction)touchBtnExitFullScreen:(id)sender {
btnExitFullScreen.hidden = YES;
toolBar.hidden = NO;
}
312
Hnh 6.278 Kt qu mi to
Qua giao din tr vo ViewController va to
313
314
315
317
318
319
Kt qu:
321
322
324
325
Ti hm viewDidLoad sa li nh sau:
- (void)viewDidLoad
{
[super viewDidLoad];
url = @"http://lhu.edu.vn";
[self loadURL:url];
}
326
327
329
331
332
333
334
335
@implementation SearchingHomeViewController
NSMutableArray *arrPlaces;
NSMutableArray *arrSearchingResults;
Chy th:
Gii thch: phng thc ny cho bit s dng trong mt table, chng ta s phn ra 2
trng hp, trng hp mc nh tc khi cha s dng searchBar tm kim th s
dng trong table chnh l s phn t trong mng arrSearchingResults, trng hp cn
li khi s dng tm kim (searchBar) th s dng trong table chnh l s phn t trong
mng arrSearchingResults cng chnh l s kt qu tm c.
Chy th, kt qu:
339
340
341
342
343
344
345
348
349
Ti Map View Controller nhp chn button detail (gc phi di cng) gi
Ctrl v ko th sang Place Detail View Controller.
350
351
Ti Place Detail View Controller nhp chn button website (hnh tri a cu)
gi Ctrl v ko th sang Web View Controller.
352
353
354
355
Gii thch: phng thc changeSlider c gi khi ngi dng thay i khong
cch tm kim. changeSlider s thc hin thay i v lu li gi tr khong cch vo
button btnDistance.
- (NSString *)getDistance {
NSString *strDistance = btnDistance.titleLabel.text;
return [strDistance substringToIndex:strDistance.length-2];
}
356
358
{
IBOutlet UIButton *btnDistance;
IBOutlet UIButton *btnLanguage;
}
- (IBAction)touchBtnDistance:(id)sender;
- (IBAction)touchBtnLanguage:(id)sender;
@end
M HomeViewController.m ti hm touchBtnLanguage sa li nh
sau:
- (IBAction)touchBtnLanguage:(id)sender {
UIImage *img=[(UIButton *) sender currentImage];
if (img == [UIImage imageNamed:@"Vi.png"]) {
[sender setImage:[UIImage imageNamed:@"En.png"] forState:UIControlStateNormal];
} else {
[sender setImage:[UIImage imageNamed:@"Vi.png"] forState:UIControlStateNormal];
}
[self.tableView reloadData];
}
360
- (void)startLocation {
if (locationManager == nil) {
locationManager = [[CLLocationManager alloc] init];
}
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
}
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray
*)locations {
[locationManager stopUpdatingLocation];
}
#import "Place.h"
@implementation Place
@synthesize imageName, titleEn, titleVi, placeType, keyWord;
- (id)initWithCoder:(NSCoder *)decoder {
self = [super init];
if(self) {
imageName = [decoder decodeObjectForKey:ImageNameKey];
titleEn = [decoder decodeObjectForKey:TitleEnKey];
titleVi = [decoder decodeObjectForKey:TitleViKey];
placeType = [decoder decodeObjectForKey:PlaceTypeKey];
keyWord = [decoder decodeObjectForKey:KeyWordKey];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:imageName forKey:ImageNameKey];
[encoder encodeObject:titleEn forKey:TitleEnKey];
[encoder encodeObject:titleVi forKey:TitleViKey];
[encoder encodeObject:placeType forKey:PlaceTypeKey];
[encoder encodeObject:keyWord forKey:KeyWordKey];
}
@end
Ti viewDidLoad sa li nh sau:
- (void)viewDidLoad
{
[super viewDidLoad];
NSUserDefaults *passingValue = [NSUserDefaults standardUserDefaults];
coordinate.latitude = [[passingValue objectForKey:@"currentLatitude"] floatValue];
coordinate.longitude = [[passingValue objectForKey:@"currentLongitude"] floatValue];
NSString *radius = [passingValue objectForKey:@"distance"];
364
366
367
- (IBAction)touchBtnSearch:(id)sender;
@end
Sa li hm numberOfRowsInSection nh sau:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (tableView == self.tableView) {
return arrPlaceSearching.count;
} else {
[self searchThroughData];
return arrFilteringResults.count;
}
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.selectionStyle = UITableViewCellAccessoryNone;
int row = indexPath.row;
PlaceSearching *ps;
if (tableView == self.tableView) {
ps = [arrPlaceSearching objectAtIndex:row];
} else {
ps = [arrFilteringResults objectAtIndex:row];
}
// Configure the cell...
Qua giao din t tn cho lin kt gia Finding Place View Controller v
Map View Controller l MapView.
370
if(self) {
name = [decoder decodeObjectForKey:NameKey];
vicinity = [decoder decodeObjectForKey:VicinityKey];
units = [decoder decodeObjectForKey:UnitsKey];
latitude = [decoder decodeObjectForKey:LatitudeKey];
longitude = [decoder decodeObjectForKey:LongitudeKey];
reference = [decoder decodeObjectForKey:ReferenceKey];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:name forKey:NameKey];
[encoder encodeObject:vicinity forKey:VicinityKey];
[encoder encodeObject:units forKey:UnitsKey];
[encoder encodeObject:latitude forKey:LatitudeKey];
[encoder encodeObject:longitude forKey:LongitudeKey];
[encoder encodeObject:reference forKey:ReferenceKey];
}
@end
Sa li viewDidLoad nh sau:
- (void)viewDidLoad
372
{
[super viewDidLoad];
[self startLocation];
myMapView.delegate = self;
NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:@"PlaceSearching"];
PlaceSearching *ps = [NSKeyedUnarchiver unarchiveObjectWithData:data];
[self addAnnotation:ps.latitude
longitude:ps.longitude
title:ps.name
subtitle:ps.vicinity];
self.navigationItem.title = ps.name;
}
Sa li viewDidLoad nh sau:
- (void)viewDidLoad
{
[super viewDidLoad];
NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:@"PlaceSearching"];
PlaceSearching *ps = [NSKeyedUnarchiver unarchiveObjectWithData:data];
PlaceDetail *pd = [self searchPlaceDetailFromGoogle:ps.reference];
[self displayPlaceDetail:pd];
}
376
Hnh 6.357 To kt ni
Chn modal
377
378
Hnh 6.360 To kt ni
Chn modal
379
380
381
382
383
M NATAppDelegate.m hm didFinishLaunchingWithOptions sa
li:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions
{
UIImage * backButtonImage = [UIImage imageNamed: @"go_back.png"];
backButtonImage = [backButtonImage stretchableImageWithLeftCapWidth: 21.0
topCapHeight: 30.0];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage: backButtonImage forState:
UIControlStateNormal barMetrics: UIBarMetricsDefault];
// Override point for customization after application launch.
return YES;
}
384
CHNG VII
A NG DNG LN IPHONE
Sau khi xy dng hon chnh ng dng cho iPhone, bn cn phi a ng dng ln
chy trn thit b iPhone tht kim tra li hot ng ca ng dng trn iPhone. Ngay
c khi bn cn ng xy dng ng dng trn Xcode, nhiu ng dng bn cng phi a
ln thit b tht mi kim tra c tnh nng, do iOS Simulator tuy m phng iPhone
nhng vn cn mt s im hn ch nh khng c camera, khng c microphone Hn
na bn s c c mt cm thy ho hng, phn khi khi nhn thy ng dng hon thin
ca bn chy n nh trn iPhone ca bn hay trn iPhone ca bn b.
Do iu kin cho php cn nhiu hn ch nn ni dung chng ny ch gii thiu
n bn cch thc a ng dng ln iPhone jailbreak bng cng c JailCoder. Sau khi
c xong chng ny, bn s nm c qu trnh chun b trc khi a ng dng ln
iPhone, cng nh cch thc tng bc a ng dng ln iPhone bng cng c
JailCoder.
386
389
390
391
392
394
395
CHNG VIII
MT S VN KHC
Mc d iOS 7 chnh thc c a vo s dng v cho php nng cp ln t cc
phin bn iOS trc o. Tuy nhin v mt s l do nh iu kin kinh t, iOS 7 cn li,
cha c jailbreak nn ngi dng vn cn dnh s u i cho phin bn iOS c hn. Do
khi bn tin hnh xy dng mt ng dng cho iPhone, bn phi suy ngh xem ng
dng ca bn s h tr cho phin bn iOS no hay s h tr cho c hai. Nu ng dng ca
bn h tr c c iOS 7 ln cc phin bn th l mt iu tuyt vi. ng dng c th
tng thch c nhiu i my, nhiu phin bn iOS, tip cn c nhiu ngi dng
hn.
Tuy nhin bn s t cu hi lm sao ng dng ca bn c th tng thch c
nh vy? Bn ng qu lo lng v vic ny, Xcode h tr sn cho bn. Cc vn
c trnh by trong chng ny s gip bn hiu hn v cch thc vit mt ng dng
cho phin bn iOS c bng cng c Xcode 5, ng thi ni dung chng cng gip bn
khm ph tnh nng h tr xy dng ng dng c th chy song song iOS 7 v cc phin
bn iOS c hn m Xcode 5 mang n.
396
397
398
399
402
chia i Editor area cho d quan st. Trong menu ca Assistant Editor, bn chn
Preview > chn Storyboard xem giao din ng dng trn khung Editor va mi m
ra.
404
405
Hnh 8.16 Giao din khi chy bng iOS Simulator vi iOS 7
Giao din khi chy bng iOS Simulator vi iOS 6.1
Hnh 8.17 Giao din khi chy bng iOS Simulator vi iOS 6.1
406
CU HI THNG GP
T hc lp trnh iPhone c c khng?
Bn c th t hc lp trnh iPhone, tuy nhin thi gian s lu hn v i hi bn
phi kin nhn, tm hiu nhiu t cc ti liu, video, internet.
Ngi cha bit g v lp trnh c hc vit ng dng iPhone c khng?
Bn cha bit g v lp trnh vn c th hc vit ng dng cho iPhone nh bao
ngi khc ch cn bn c am m, sing nng hc v thc hnh, tm hiu ti liu. Tuy
nhin nu c kin thc c bn v lp trnh bn s tip thu ni dung nhanh hn
Khng c iPhone c hc lp trnh iPhone c khng?
Khng c iPhone th bn vn c th hc lp trnh iPhone bnh thng, ng dng
bn xy dng c c th chy th trn cng c gi lp iPhone m Apple cung cp
km theo Xcode l iOS Simulator, tuy nhin iOS Simulator vn cn mt s hn ch m
ch c iPhone tht mi c nh camera. Tuy nhin bn c th tm mua iPhone c chy iOS
6 hc lp trnh, gi tng i r.
Khng c my Mac c th lp trnh iPhone hay khng?
Bn c th lp trnh iPhone m khng cn ti my Mac. Bn c th xem Chng 1,
phn 1.1.
S dng h iu hnh Windows, lm sao ci c Xcode lp trnh iPhone?
Bn c th ci Mac OS ln my o ri ci t Xcode bnh thng. Nh vy bn c
th lp trnh iPhone trn Window ri. Bn c th xem thm ti Chng 1, phn 1.1.
Ngn ng no c dng vit ng dng iPhone?
ng dng iPhone thng c vit bng cc ngn ng nh Objective-C, C++, C
hoc Java tuy nhin ngn ng Objective-C vn l ngn ng chnh c s dng nhiu
nht.
th nghim Xcode, th nghim iOS mi Apple Developer ID dnh cho iOS c 3 loi
chnh: iOS Developer Program dnh cho cc lp trnh vin vi 99$/nm, iOS Developer
Enterprise Program dnh cho cc doanh nghip vi 299$/nm, iOS Developer University
Program dnh cho cc trng a lp trnh iOS vo ging dy v c min ph. Bn c
th tm hiu thm ti https://developer.apple.com/programs/
410
PH LC
Source Km Theo Ti Liu
https://www.mediafire.com/folder/pulecvu1ic48t/
Sch Bn Nn c
1. Apress, Learn Objective-C on the Mac For OS X and iOS 2nd.
2. Aaron Hillegass , Objective-C Programming: The Big Nerd Ranch Guide.
3. Apress, iPhone and iPad Apps for Absolute Beginners 3rd.
4. OReilly , Head First iPhone & iPad Development.
5. OReilly , iPhone App Development: The missing manual.
6. Neal Goldstein & Dave Wilson, iOS 6 Application Development For Dummies.
7. Neal Goldstein , iPhone Application Development For Dummies.
Video Bn Nn Xem
1. http://www.youtube.com/user/MilmersXcode
2. http://www.youtube.com/playlist?list=PLA138EFCAFA592E7E
3. http://www.youtube.com/user/ChupaMobile
4. http://www.youtube.com/user/CarnegieMellonU?feature=watch
5. http://www.youtube.com/user/CodeWithChris
6. http://www.youtube.com/user/iThanhVN
7. https://itunes.apple.com/vn/course/developing-ios-7-apps-for/id733644550
8. https://itunes.apple.com/vn/course/iphone-applicationprogramming/id727587146
Website Tin ch
1. http://geekylemon.com/
2. http://www.appcoda.com/tutorials/
3. https://www.udemy.com/blog/how-to-build-an-iphone-app-from-scratch-fornon-technical-people/
4. http://www.idev101.com/learn/
5. http://www.mobioneer.com/6-iphone-app-development-tutorial.html/
6. http://nhatnghe.com/forum/forumdisplay.php?f=154
7. http://codewithchris.com/
8. http://www.chupamobile.com/tutorial-ios
9. http://www.iphoneapptuts.com/
10. http://www.facebook.com/LapTrinhiOS
11. http://iosclass.blogspot.in/
412