按钮设置标题: [but setTitle:@"确定" forState:UIControlStateNormal];
文本框等其他设置标题都是@“” te.text=@"你看见我了?"
按钮中增加事件: [but addTarget:self action:@selector(ok:) forControlEvents:UIControlEventTouchUpInside];
#import <UIKit/UIKit.h>
警报: UIAlertView
@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
UITextView *tv ;
UITextField * te;
NSString *str;
}
@property (strong,nonatomic) UIWindow *window;
@end
.m文件:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindowalloc