是否有可能使我的IBAction为一个按钮元素返回一个可以在另一个IBAction中使用的整数?我希望我的IBAction"转发返回整数" i"我怎样才能使我的其他IBAction方法接受整数参数?
- (IBAction)forward:(id)sender {
if (i < users.count) {
SiteValue* s = [users objectAtIndex: i];
NSString *website = s.website;
NSString *username = s.username;
NSString *password = s.password;
int count = s.count;
websiteText.text = website;
usernameText.text = username;
passwordText.text = password;
NSString* countString = [NSString stringWithFormat:@"%i", count];
countText.text = countString;
}
i = i + 1;
}