-(
void
)customShow{
CustomIOSAlertView *alertView = [[CustomIOSAlertView alloc] init];
[alertView setContainerView:[
self
customView]];
[alertView setButtonTitles:[
NSMutableArray
arrayWithObjects:@
"取消"
, @
"确定"
,
nil
]];
[alertView setDelegate:
self
];
[alertView setOnButtonTouchUpInside:^(CustomIOSAlertView *alertView,
int
buttonIndex) {
NSString
*result=alertView.buttonTitles[buttonIndex];
NSLog
(@
"点击了%@按钮"
,result);
[alertView close];
}];
[alertView setUseMotionEffects:
true
];
[alertView show];
}
- (UIView *)customView
{
UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 240, 160)];
UILabel *tip=[[UILabel alloc]initWithFrame:CGRectMake(100, 10, 50, 30)];
[tip setText:@
"提示"
];
[customView addSubview:tip];
UILabel *content=[[UILabel alloc]initWithFrame:CGRectMake(10, 60, 210, 30)];
[content setText:@
"http://www.cnblogs.com/xiaofeixiang"
];
[content setFont:[UIFont systemFontOfSize:12]];
[customView addSubview:content];
return
customView;
}