- (void)alertStatus {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Log In"
message:@"Please enter your username and password"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
[alertView show];
}
這是.m文件iOS的方法聲明的煩惱
import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITextField *txtPassword;
@property (weak, nonatomic) IBOutlet UITextField *txtUserName;
- (IBAction) LoginClicked:(id)sender;
@end
這是.h文件,能有人幫助我瞭解如何聲明這個方法吧。
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html – 2014-11-23 22:36:52