Ray's playground

 

随笔分类 -  iPhone

View Controllers(Chapter 7 of iOS Programming: The Big Nerd Ranch Guide)
摘要:UIViewController has several methods that get called at certain times: viewWillAppear: when its view is about to be added to the window viewDidAppear: when its view has been added to the window viewWillDisappear: when its view is about to be dismissed, covered, or otherwisehidden from view viewDidDi 阅读全文

posted @ 2011-11-11 16:08 Ray Z 阅读(207) 评论(0) 推荐(0)

Subclassing UIView(Chapter 6 of iOS Programming: The Big Nerd Ranch Guide)
摘要:Every UIView subclass implements the method drawRect:, which contains the drawing code for theview. For example, a UIButton’s drawRect: method draws a rounded rectangle with a title string in thecenter. Each time an instance of UIView needs to be drawn (or redrawn), the system prepares a graphicsco. 阅读全文

posted @ 2011-11-04 16:19 Ray Z 阅读(257) 评论(0) 推荐(0)

MapKit and Text Input(Chapter 5 of iOS Programming: The Big Nerd Ranch Guide)
摘要:The Core Location framework tells us where we are in the world; the MapKit framework shows usthat world. Most of MapKit’s work is done by the class MKMapView. Instances of this type display amap, track touches, and display annotations. 阅读全文

posted @ 2011-11-04 15:52 Ray Z 阅读(154) 评论(0) 推荐(0)

Delegation and Core Location(Chapter 4 of iOS Programming: The Big Nerd Ranch Guide)
摘要:Delegation is an object-oriented approach to callbacks. A callback is a function that is supplied inadvance of an event and is called every time the event occurs. Some objects need to make a callbackfor more than one event. For instance, the location manager wants to “callback” when it finds a newl. 阅读全文

posted @ 2011-11-01 10:07 Ray Z 阅读(216) 评论(0) 推荐(0)

Memory Management(Chapter 3 of iOS Programming: The Big Nerd Ranch Guide)
摘要:If you create an object using a method whose name starts with alloc or new or contains copy, thenyou have taken ownership of it. (That is, assume that the new object has a retain count of 1 and isnot in the autorelease pool.) You have a responsibility to release the object when you no longer needit. 阅读全文

posted @ 2011-10-31 17:54 Ray Z 阅读(298) 评论(0) 推荐(0)

Gestures and Touches(Chapter 8 of The iPhone™ Developer’s Cookbook)
摘要:Touches have life cycles. Each touch can pass through any of five phases that represent theprogress of the touch within an interface. These phases are as follows:  UITouchPhaseBegan—Starts when users touch the screen.  UITouchPhaseMoved—Means a touch has moved on the screen.  UITouchPhaseStationary— 阅读全文

posted @ 2010-12-31 13:59 Ray Z 阅读(233) 评论(0) 推荐(0)

Assembling Views and Animations(Chapter 6 of The iPhone™ Developer’s Cookbook)
摘要:Views store arrays of their children. Retrieve this array by calling [aView subviews].Onscreen, the child views are always drawn after the parent, in the order that they appearin the subviews array.These views draw in order from back to front, and the subviewsarray mirrors that drawing pattern.Views 阅读全文

posted @ 2010-12-28 18:32 Ray Z 阅读(121) 评论(0) 推荐(0)

Working with view controllers(Chapter 5 of The iPhone™ Developer’s Cookbook)
摘要:[代码] 阅读全文

posted @ 2010-12-27 18:46 Ray Z 阅读(238) 评论(0) 推荐(0)

Designing Interfaces(Chapter 4 of The iPhone™ Developer’s Cookbook)
摘要:One of the great things about Cocoa Touch is that you don’t have to program entirely byhand or entirely using Interface Builder.You can leverage IB’s visual layout and combine itwith Xcode-based programming for a better, hybrid solution. 阅读全文

posted @ 2010-12-27 18:39 Ray Z 阅读(152) 评论(0) 推荐(0)

Building Your First Project(Chapter 2 of The iPhone™ Developer’s Cookbook)
摘要:[代码] 阅读全文

posted @ 2010-12-22 18:45 Ray Z 阅读(3743) 评论(0) 推荐(0)

Introducing the iPhone SDK(Chapter 1 of The iPhone™ Developer’s Cookbook)
摘要:The main.m file has two jobs. First, it creates a primary autorelease pool for your application.Second, it invokes the application event loop.These two elements provide critical elementsto get your ap... 阅读全文

posted @ 2010-10-12 12:35 Ray Z 阅读(224) 评论(0) 推荐(0)

导航