题目内容

解释下面代码段的功能: -(IBAction)setNum:(id)sender { UIButton *btnTemp=(UIButton *) sender;myValue.text=[[NSString stringWithFormat:@"%@",myValue.text]stringByAppendingString:btnTemp.titleLabel.text]; }

查看答案
更多问题

解释下面代码段的功能: int i;NSString *picFileName; NSMutableArray *picArray=[[NSMutableArray alloc]init]; for (i=0; i<=11; i++) { picFileName=[NSString stringWithFormat:@"10%d.png",i]; [picArray addObject:[UIImage imageNamed:picFileName]]; } animateImageView.animationImages= picArray; animateImageView.animationDuration=1; animateImageView. animationRepeatCount=0; [animateImageView startAnimating];

解释下面代码段的功能:- ( IBAction ) switchChanged: ( id ) sender {UISwitch *temp = ( UISwitch * ) sender;if ( temp.on == NO ) {[_rabbitImageView stopAnimating]; }else[_rabbitImageView startAnimating]; }

解释下面代码段的功能:if ( [_numLabel.text rangeOfString: @"-" ].location == NSNotFound ) {_numLabel.text = [ @"-" stringByAppendingString: _numLabel.text];}else_numLabel.text = [ _numLabel.text substringFromIndex: 1 ];

解释下面代码段的功能:UIAlertController *alertC=[ UIAlertController alertControllerWithTitle: @"提示"message: @"你好!" preferredStyle: UIAlertControllerStyleAlert];UIAlertAction *okAction=[ UIAlertAction actionWithTitle: @"确定"style: UIAlertActionStyleDefault handler: nil];[alertC addAction: okAction];[self presentViewController: alertC animated: true completion: nil];

答案查题题库