UIButton,UIAlertView
来源:互联网 发布:charge是什么软件 编辑:程序博客网 时间:2024/06/05 01:04
#import "AppDelegate.h"
@interface AppDelegate () <UIAlertViewDelegate>
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindowalloc] initWithFrame:[[UIScreenmainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColorwhiteColor];
[self.windowmakeKeyAndVisible];
[_windowrelease];
UIButton *button = [UIButtonbuttonWithType:UIButtonTypeSystem];
button.frame =CGRectMake(50,50, 50,30);
button.backgroundColor = [UIColorgrayColor];
[button setTitle:@"点击"forState:UIControlStateNormal];
[button addTarget:selfaction:@selector(buttonWithType:)forControlEvents:UIControlEventTouchUpInside];
[self.windowaddSubview:button];
returnYES;
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
// 当点击了alertView上的按钮之后,会调用这个方法
NSLog(@"%ld", buttonIndex);
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
NSLog(@"%ld", buttonIndex);
}
- (void)buttonWithType:(UIButton *)button
{
NSLog(@"GOOD");
UIAlertView *alertView = [[UIAlertViewalloc] initWithTitle:@"title"message:@"message"delegate:selfcancelButtonTitle:@"残忍拒绝"otherButtonTitles:@"赏个脸",@"啵一个",nil];
[alertView show];
[alertView release];
}
- (void)dealloc
{
[_windowrelease];
[superdealloc];
}
- UIButton,UIAlertView
- UI_基础视图(UILabel UITextField UIButton UIAlertView)
- IOS UI02UILabel,UITextField,UIButton,UIAlertView,delegate
- UI基本控件-UILabel-UITextField-UIButton-UIAlertView
- UIView UILabel UITextFiled UIButton UIControlView UIAlertView
- Xamarin.iOS-UIButton和UIAlertView【控件篇】
- UI 常用方法总结之--- UIButton UIAlertView (不断更新中)
- 基础控件之UILabel、UIButton、UITextField、UIAlertView、 UIImageView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- UIAlertView
- LeetCode 082~083 Remove Duplicates from Sorted List
- P122第28题
- Lighter or Heavier算法设计
- lucene 索引文件格式
- AndrewNg - 线性回归【1】梯度下降
- UIButton,UIAlertView
- (7-6)hive的set命令
- 相关
- (ASCII UTF-8 Unicode )字符编码小结
- kyeremal-网络流24题T4-魔术球问题
- 使用java程序模拟页面发送http的post请求
- 心情日记
- Android实现按A-Z字母排序和模糊查询
- uva- 1593 - Alignment of Code c++,stl练习