Lecture 09

Lecture 09 - CS193p Spring 2010 Monday, April 26, 2010...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS193p Spring 2010 Monday, April 26, 2010 Announcements None Homework Questions? Monday, April 26, 2010 Todays Topics Miscellaneous Review UIKit Object of the Week: UIImageView UIScrollView Monday, April 26, 2010 Miscellaneous Initializers are not called from Interface Builder! awakeFromNib Protocols that want to do retain / release (or more) @protocol GraphViewDelegate<NSObject> @protocol MyControllerDelegate<UIViewController> Toolbars (on the bottom) in UINavigationController Check out method toolBarItems in UIViewController Show/hide toolbar via UINavigationController s setToolbarHidden:animated: Private properties In your implementation (.m) Fle you can put ... @interface MyClass(Private) @property (readonly) float privateProperty; @end Monday, April 26, 2010 Review Objective-C Classes, Methods, Properties, Protocols, Delegation, Memory Management Foundation NSArray , NSDictionary , NSString (and mutable versions thereof) MVC and View Controllers Separation of Model from View using Controller view property in UIViewController , loadView or from .xib viewDidLoad , viewDidUnload (outlet releasing), orientation changes viewWillAppear: / Disappear: , title , initWithNibName:bundle: Interface Builder Creating a View using drag and drop and inspection UIButton , UILabel , UISlider Monday, April 26, 2010 Review Custom Views drawRect: , UIGestureRecognizer , initWithFrame: , Quartz2D ( CGContext ...) Application Lifecycle applicationDidFinishLaunching: , MainWindow.xib Platform-conditional code for iPad versus iPhone/iPod-Touch Simulating 3.2 code on a 3.1 Simulator UINavigationController Pushing onto the stack, navigationItem UITabBarController UIViewController s tabBarItem method UISplitViewController Delegate to do the popover button in portrait Monday, April 26, 2010 UIImage Create by name Looks in your Resources folder UIImage *image = [UIImage imageNamed:@foo.jpg]; Or create with data UIImage *image = [UIImage imageWithContentsOfFile:(NSString *)path]; UIImage *image = [[UIImage alloc] initWithData:(NSData *)data]; Get size @property (readonly) CGSize size; Draw in a drawRect: or use UIImageView- (void)drawAtPoint:(CGPoint)p; // p is upper left corner- (void)drawInRect:(CGRect)r; // scales bits to Ft r- (void)drawAsPatternInRect:(CGRect)r; // tiles image- (void)drawInRect:(CGRect) blendMode:(CGBlendMode) alpha:(CGFloat) // this last one can blend images together with transparency Monday, April 26, 2010 UIImageView Can drag out in Interface Builder or alloc/init...
View Full Document

Page1 / 44

Lecture 09 - CS193p Spring 2010 Monday, April 26, 2010...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online