- 浏览: 2552362 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
IPhone Development Tips(1)Build the Environment
1. Environment
The Mac OS X version is 10.6.7.
Visit this URL http://www.apple.com.cn/developer/ and download the iphone sdk with your developer id.
IPhone SDK:
Xcode is an IDE, base on GNU gcc and gdb.
Instruments, watch the memory and performance. It is base on SUN DTrace.
Dashcode
Simulator
IB(Interface Builder) build the user interface.
First of all, I am updating my mac os system. After that the system version is 10.6.8. And click update again, and update again.
Finally, I copy the update file 'Install Mac OS X Lion' from my collegue, double click and install it on my system.
The system is updated to 10.7.
Install xcode software, this is copied from my collegue too. The name is 'Install Xcode'.
The IPhone code is based on Objective-C 2.0.
2. Sample Application
create a new xcode project ----> IOS----> Application ----> Single View Application
Enter the
Product Name --> hello3
Company Identifer --> sillycat
Class Prefix ----> hello3
Device Family ----> IPhone
Use Storyboard ----> Checked
User Automatic Reference Counting ----> checked
Include Unit Tests ----> Not Checked
And click 'Next' ----> click 'Create' ----> Click 'Run', we can see the hello3 application with a white paper.
Find Out How an Application Starts Up
Most of the work is done by UIApplicationMain function in main.m. The main function in main.m calls the UIApplicationMain function within an autorelease pool.
main.m
The call to UIApplicationMain also scans the application’s Info.plist file. The Info.plist file is a property list that contains information about the application such as its name and icon.
HelloWorld-Info.plist
In this application, the storyboard file is named MainStoryboard.storyboard (note that the Info.plist file shows only the first part of this name). When the app starts, the MainStoryboard.storyboard file is loaded and the initial view controller is instantiated from it.
MainStoryboard.storyboard
Xcode opens the storyboard file in the editor area. (The area behind the storyboard objects—that is, the area that looks like graph paper—is called the canvas.)
A storyboard file contains scenes and segues. A scene represents a view controller, which manages one area of content, and a segue represents a transition between two scenes.
one scene and no segues in Single View template.
#1 A first responder placeholder object is a dynamic placeholder that represents the responder object that first receives events such as keyboard events, motion events.
#2 The hello3ViewController object
#3 A view
During setup, the application object performs the following tasks:
loads the main storyboard file ----> gets the window object from the app delegate ----> instantiates the storyboard's initial view controller and assigns it as the window object's root view controller
When the application object has completed these tasks, it sends its delegate an application:didFinishLaunchingWithOptions: message. This message gives the delegate an opportunity to perform other tasks, such as additional configuration, before the application is displayed.
Inspecting the View Controller and Its View
Use the Inspector to Examine the View Controller
When an app starts up, the main storyboard file is loaded and the initial view controller is instantiated.
click 'MainStoryboard.storyboard' ----> 'Hello3 View Controller' ----> 'Attribute Inspector'
we can see 'Is Initial View Controller' is checked.
Change the View's Background Color
click the 'View' behind the 'Hello3 View Controller' ----> In the View window, change the Background color
Configuring the View
we will add a button, a label, and a text field. Then, make connections between these elements and the view controller class so that the elements provide the behavior we want.
Add the User Interface Elements
drag the buttons and other objects from object library in right bottom.
Set some configuration to Text Field---->
Capitalization --->Words
Keyboard ---->Default
Return Key ----> Done
After that, we can take a look at the app we implemented. But there is no way to dismiss the keyboard after it appears.
references:
http://www.cocoachina.com/
http://www.cocoachina.com/newbie/index.html
http://developer.apple.com/
http://www.apple.com.cn/developer/
http://osxdaily.com/2011/07/20/upgrading-to-mac-os-x-10-7-lion/
http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/02_CreatingProject.html
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40007514-CH1-SW1
http://www.techotopia.com/index.php/Creating_a_Simple_iOS_4_iPhone_App_(Xcode_4)
1. Environment
The Mac OS X version is 10.6.7.
Visit this URL http://www.apple.com.cn/developer/ and download the iphone sdk with your developer id.
IPhone SDK:
Xcode is an IDE, base on GNU gcc and gdb.
Instruments, watch the memory and performance. It is base on SUN DTrace.
Dashcode
Simulator
IB(Interface Builder) build the user interface.
First of all, I am updating my mac os system. After that the system version is 10.6.8. And click update again, and update again.
Finally, I copy the update file 'Install Mac OS X Lion' from my collegue, double click and install it on my system.
The system is updated to 10.7.
Install xcode software, this is copied from my collegue too. The name is 'Install Xcode'.
The IPhone code is based on Objective-C 2.0.
2. Sample Application
create a new xcode project ----> IOS----> Application ----> Single View Application
Enter the
Product Name --> hello3
Company Identifer --> sillycat
Class Prefix ----> hello3
Device Family ----> IPhone
Use Storyboard ----> Checked
User Automatic Reference Counting ----> checked
Include Unit Tests ----> Not Checked
And click 'Next' ----> click 'Create' ----> Click 'Run', we can see the hello3 application with a white paper.
Find Out How an Application Starts Up
Most of the work is done by UIApplicationMain function in main.m. The main function in main.m calls the UIApplicationMain function within an autorelease pool.
main.m
The call to UIApplicationMain also scans the application’s Info.plist file. The Info.plist file is a property list that contains information about the application such as its name and icon.
HelloWorld-Info.plist
In this application, the storyboard file is named MainStoryboard.storyboard (note that the Info.plist file shows only the first part of this name). When the app starts, the MainStoryboard.storyboard file is loaded and the initial view controller is instantiated from it.
MainStoryboard.storyboard
Xcode opens the storyboard file in the editor area. (The area behind the storyboard objects—that is, the area that looks like graph paper—is called the canvas.)
A storyboard file contains scenes and segues. A scene represents a view controller, which manages one area of content, and a segue represents a transition between two scenes.
one scene and no segues in Single View template.
#1 A first responder placeholder object is a dynamic placeholder that represents the responder object that first receives events such as keyboard events, motion events.
#2 The hello3ViewController object
#3 A view
During setup, the application object performs the following tasks:
loads the main storyboard file ----> gets the window object from the app delegate ----> instantiates the storyboard's initial view controller and assigns it as the window object's root view controller
When the application object has completed these tasks, it sends its delegate an application:didFinishLaunchingWithOptions: message. This message gives the delegate an opportunity to perform other tasks, such as additional configuration, before the application is displayed.
Inspecting the View Controller and Its View
Use the Inspector to Examine the View Controller
When an app starts up, the main storyboard file is loaded and the initial view controller is instantiated.
click 'MainStoryboard.storyboard' ----> 'Hello3 View Controller' ----> 'Attribute Inspector'
we can see 'Is Initial View Controller' is checked.
Change the View's Background Color
click the 'View' behind the 'Hello3 View Controller' ----> In the View window, change the Background color
Configuring the View
we will add a button, a label, and a text field. Then, make connections between these elements and the view controller class so that the elements provide the behavior we want.
Add the User Interface Elements
drag the buttons and other objects from object library in right bottom.
Set some configuration to Text Field---->
Capitalization --->Words
Keyboard ---->Default
Return Key ----> Done
After that, we can take a look at the app we implemented. But there is no way to dismiss the keyboard after it appears.
references:
http://www.cocoachina.com/
http://www.cocoachina.com/newbie/index.html
http://developer.apple.com/
http://www.apple.com.cn/developer/
http://osxdaily.com/2011/07/20/upgrading-to-mac-os-x-10-7-lion/
http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/02_CreatingProject.html
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40007514-CH1-SW1
http://www.techotopia.com/index.php/Creating_a_Simple_iOS_4_iPhone_App_(Xcode_4)
发表评论
-
ionic UI(5)UI and Backend
2016-12-02 03:22 598ionic UI(5)UI and Backend 1 Pr ... -
Stanford Cource(2)Demo App Caculator
2014-06-24 01:29 904Stanford Cource(2)Demo App Ca ... -
Mono on MAC
2014-06-04 03:27 987Mono on MACJust fine the tool f ... -
IOS7 App Development Essentials(4)IPhone5, IPhone5s, IPhone5c
2014-04-11 03:59 990IOS7 App Development Essentia ... -
IOS7 App Development Essentials(3)NSUserDefaults
2014-04-11 02:58 1012IOS7 App Development Essentia ... -
IPhone and Location(2)Documents Region Monitoring and Region Sample
2013-10-18 05:10 1738IPhone and Location(2)Documents ... -
IPhone and Location(1)Documents User Location
2013-10-18 03:50 1312IPhone and Location(1)Documents ... -
Learn Objective C(6)Programming with Objective-C - Working with Blocks and Deali
2013-10-18 00:02 933Learn Objective C(6)Programming ... -
Learn Objective C(5)Programming with Objective-C - Working with Protocols and Va
2013-10-17 23:47 1003Learn Objective C(5)Programming ... -
Learn Objective C(4)Programming with Objective-C - Encapsulating Data and Custom
2013-10-17 23:23 939Learn Objective C(4)Programming ... -
Learn Objective C(3)Programming with Objective-C - Defining Classes, Working wit
2013-10-17 23:09 1021Learn Objective C(3)Programmi ... -
Learn Objective C(2)Learn Objective-C in Day 6 - 4 ~ 6
2013-10-17 00:30 972Learn Objective C(2)Learn Obj ... -
Learn Object C(1) Learn Objective-C in Day 6 - 1 ~ 3
2013-10-17 00:22 1117Learn Object C(1) Learn Objec ... -
APNS(4)Recall the Process and Learn Java APNS
2013-04-18 02:48 3477APNS(4)Recall the Process and L ... -
Build the iOS Things with J2Objc
2013-04-12 03:25 2469Build the iOS Things with J2Obj ... -
APNS(3)Write the Easy Client App
2013-01-15 07:23 1723APNS(3)Write the Easy Client Ap ... -
APNS(2)Try to Finish the first Example
2013-01-14 07:56 1547APNS(2)Try to Finish the first ... -
Stanford Cource(1)MVC and Object-C
2012-12-14 14:04 1328Stanford Cource(1)MVC and Objec ... -
Some VI Tips
2012-11-15 04:48 1098Some VI Tips Today, I need to c ... -
MAC Mini Setup
2012-09-25 18:45 1337MAC Mini Setup I am dealing wit ...
相关推荐
### 关于《Beginning iPhone Development: Exploring the iPhone SDK》的知识点总结 #### 一、书籍简介与适用对象 《Beginning iPhone Development: Exploring the iPhone SDK》是一本面向初学者的iPhone应用程序...
- **定义与作用**:iPhone SDK(Software Development Kit)即iPhone软件开发工具包,是苹果公司提供的一套用于开发iPhone和iPad应用程序的开发工具。 - **组成部分**: - **Xcode**:主要的集成开发环境(IDE),...
《 Beginning iPhone Development with Swift Exploring the iOS SDK》是面向初学者的一本权威指南,它深入浅出地介绍了使用Swift语言进行iOS应用开发的基础知识。这本书的源代码包含了多个实例,帮助读者通过实践来...
The update to the bestselling More iPhone Development by Dave Mark and Jeff LaMarche, More iPhone Development with Swift digs deeper into the new Apple Swift programming language and iOS 8 SDK, ...
Paperback: 352 pages Publisher: Pogue Press; 1 edition (May 4, 2010) ... This easy-to-follow guide walks you through the entire process, from sketching out your idea to promoting the finished product.
Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark, Jeff LaMarche
Pro iPhone Development with Swift 4: Design and Manage Top Quality Apps English | 2018 | 457 Pages | ISBN : 1484233808
Beginning iPhone Development with Swift 4 Exploring the iOS SDK(4th) 英文epub 第4版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
包含Pro iPhone Development with Swift 4和Beginning iPhone Development with Swift图书两本,非扫描版 高清带目录。 Swift 4 for Absolute Beginners Develop Apps for iOS(4th) 英文无水印原版pdf 第4版 pdf...
《Beginning iPhone Development》英文版,台湾人翻译为精通iPhone开发。在看这本书之前,确认你已经看了Objective-C,至少你有个大概的知识背景,可下载 http://download.csdn.net/source/2166535 这个来看,看完...
Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark, Jeff LaMarche 一共两个压缩包
Beginning iPhone 3 Development Exploring the iPhone SDK.part1.rar
If so, Beginning iPhone 3 Development: Exploring the iPhone SDK is just the book for you. Updated and revised for iPhone SDK 3, many of the discussions in the original book have been clarified to ...
This book systematically lowers the barriers to iPhone development, enabling web developers to build any iPhone application they can imagine without long development cycles or steep learning curves!
英文原版 带目录 精排 ... and then add in the extensive and well-written documentation provided by Apple, you’ll have everything you need to build your own professional iPhone and iPad applications.”
Stanford iPhone Application Development Course 史丹福iPhone開發教程資料彙整分享. First Assignment • First assignment handed out today, 2 parts • Intended to get you situated with tools and start ...