1 / 10

How to use UIActionSheet

How to use UIActionSheet. 1 What’s the ActionSheet? 2 Syntax format: UIActionSheet *object name=[[UIActionSheet alloc]initWithTitle:@”NSString” delegate:nil cancelBttonTitle:@”NSString” destructiveButtonTitle:@”NSString” otherButtonTitles:nil];. How to use UIAlterView.

Download Presentation

How to use UIActionSheet

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to use UIActionSheet 1 What’s the ActionSheet? 2 Syntax format: UIActionSheet *object name=[[UIActionSheet alloc]initWithTitle:@”NSString” delegate:nil cancelBttonTitle:@”NSString” destructiveButtonTitle:@”NSString” otherButtonTitles:nil];

  2. How to use UIAlterView 3 how to show the AlterView [object name showInView:self.view];

  3. Some important code - (IBAction)actionSheet:(id)sender { UIActionSheet *sheet1=[[UIActionSheet alloc]initWithTitle:@"select button" delegate:self cancelButtonTitle:@"ok" destructiveButtonTitle:@"nothing" otherButtonTitles:@"aa",@"bb", nil]; [sheet1 showInView:self.view]; }

  4. Some important code -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ NSString *cc=[actionSheet buttonTitleAtIndex:buttonIndex]; if ([cc isEqualToString:@"nothing"]) { text1.text=@"nothing"; }else if ([cc isEqualToString:@"aa"]){ text1.text=@"aa"; }else if ([cc isEqualToString:@"bb"]){ text1.text=@"bb"; }}

  5. 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;

  6. 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];

  7. How to use UIImageView 4 Use Center to create: object name.center=CGPointMake(CGFloat X,CGFloate Y);

  8. How to use UIImageView 5 Use tranform to create: object name.tranform=CGAffineTransform MakeTranslation(CGFloat tx,CGFloate ty);

  9. How to use UIImageView 6 Use tranform to create: object name.tranform=CGAffineTransform MakeRotation(CGFloat angle);

  10. Any question?

More Related