90 likes | 153 Views
How to use UIImageView. 1 What’s the ImageView? 2 Use initWithImage to create As Background: UIImageView *object name=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@”picture name”]]; self.view=object name;. How to use UIImageView. 3 Use initWithFrame to create:
E N D
How to use UIImageView 1 What’s the ImageView? 2 Use initWithImage to create As Background: UIImageView *object name=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@”picture name”]]; self.view=object name;
How to use UIImageView 3 Use initWithFrame to create: UIImageView *object name=[[UIImageView alloc]initWithFrame:CGRectMake(80,150,150,200)]; object name.image=[UIImage imageNamed:@”picture name”]]; [self.view addSubView:object name];
How to use UIImageView 4 Use Center to create: object name.center=CGPointMake(CGFloat X,CGFloate Y);
How to use UIImageView 5 Use tranform to create: object name.tranform=CGAffineTransform MakeTranslation(CGFloat tx,CGFloate ty);
How to use UIImageView 6 Use tranform to create: object name.tranform=CGAffineTransform MakeRotation(CGFloat angle);
How to use UIWebView 1 What’s the WebView? 2 Syntax format: UIWebView *object name=[[UIWebView alloc]initWithFrame:CGRectMake(10,10,300,300)]; [self.view addSubView:object name]
How to load WebPage 1 Link URL NSURL *objectName1=[NSURL URLWithString:(NSString)]; 2 Transform URL NSURLRequest *objectName2=[NSURLRequest requestWithURL:(NSURL)];
How to load WebPage 3 Load URL [objectName1 loadRequest:objectName2];