• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
iOS Image and Scrollview
 

iOS Image and Scrollview

on

  • 1,181 views

 

Statistics

Views

Total Views
1,181
Views on SlideShare
1,018
Embed Views
163

Actions

Likes
1
Downloads
7
Comments
0

7 Embeds 163

http://aragornyeh.blogspot.tw 145
http://aragornyeh.blogspot.com 12
http://aragornyeh.blogspot.it 2
http://reader.aol.com 1
http://aragornyeh.blogspot.com.au 1
http://aragornyeh.blogspot.ch 1
http://aragornyeh.blogspot.co.uk 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    iOS Image and Scrollview iOS Image and Scrollview Presentation Transcript

    • aragornyeh.blogspot.com
    • WINDOW & VIEW
    • UIWindow and UIView
    • Example
    • Position and Size Bounds: (origin, size) in local view coordinates Frame: (origin, size) in containing view’s coordinates Center: view’s center in containing view’s coordinates
    • Creating & Manage Views UIView *aView = [[UIView alloc]initWithFrame:[window frame]]; [window addSubview:aView]; - (void)removeFromSuperview; - (void)insertSubview:(UIView *)view atIndex:(NSInteger)index; - (void)bringSubviewToFront:(UIView *)view;
    • Add Image UIImageView &imageView = [[UIImageView alloc] initWithFrame: self.view.bounds]; imageView.image = [UIImage imageNamed:"0.png"]; imageView.contentMode = UIViewContentModeScaleAspectFit; [self.view addSubview:imageView];
    • Hide iPhone status bar
    • applicationDidFinishLaunching: [UIApplication sharedApplication] setStatusBarHidden:YES
    • UISCROLLVIEW
    • UIScrollView
    • UIScrollView
    • Add ScrollView UIScrollVview *scrollView = [[UIScrollView alloc] init]; scrollView.frame = self.view.bounds; scrollView.contentSize = CGSizeMake( self.view.frame.size.width*kPageNum, self.view.frame.size.height); scrollView.pagingEnabled = YES; [self.view addSubview:scrollView];
    • DEMO
    • Homework #7 • Image ScrollView App – Email Project Folder .Zip
    • iPhone Programming is Easy! Questions? aragornyeh@gmail.com