uialertview
* alertview=[[
uialertview
alloc
]initwithtitle
:nil
message:@"
真的要退出?"
delegate
:self
cancelbuttontitle:@"
確定"otherbuttontitles:@"
取消", nil];
alertview.
tag=11;
[alertview
show
]; 然後實現
uialertviewdelegate的**方法
-(void
)alertview:(
uialertview
*)alertview clickedbuttonatindex:(
nsinteger
)buttonindex
2.3帶輸入框的alert
//登陸彈出框:乙個文字輸入框,乙個密碼框
uialertview *alertview = [[uialertview alloc]
initwithtitle:@"password" message:@"please enter your credentials" delegate:self
cancelbuttontitle:@"cancel" otherbuttontitles:@"ok", nil];
//設定alertview的樣式
[alertview setalertviewstyle:uialertviewstyleloginandpasswordinput];
[alertview show];
//登陸彈出框:乙個文字輸入框,乙個密碼框
uialertview *alertview = [[uialertview alloc]
initwithtitle:@"password" message:@"please enter your credentials" delegate:self
cancelbuttontitle:@"cancel" otherbuttontitles:@"ok", nil];
//設定alertview的樣式
[alertview setalertviewstyle:uialertviewstyleloginandpasswordinput];
[alertview show];
uialertviewstyleplaintextinput
新增乙個普通輸入框
uialertviewstylesecuretextinput
密碼輸入框
uialertviewstyleloginandpasswordinput
普通輸入框加密碼輸入框
-(
void
)alertview : (uialertview*)alertview clickedbuttonatindex:(nsinteger)buttonindex
2
ios學習筆記 UIAlertView
uialertview view uialertview alloc initwithtitle 標題 message 內容 delegate nil cancelbuttontitle 取消 otherbuttontitles 確定 nil view.alertviewstyle uialertv...
UIAlertView警報 IOS開發
uialertview myalert uialertview alloc initwithtitle sorry message 1234567890 delegate self cancelbuttontitle ok otherbuttontitles nil,nil myalert.dele...
iOS開發 ios7 UIAlertView自定義
之前乙個專案適配ios7之後,發現原先的uialertview無法正常顯示。後來發現ios7裡面原生態的uialertview不支援自定義了。然後就去github上找了下。發現了乙個不錯的第三方庫。和我們之前的使用習慣差不多。mark一下。下面給個簡單的示例。將這兩個檔案加入我們的工程下。在需要使用...