this picture should enough: 
i have been scouring web find answers , none else seems have problem. using xcode 7 beta 3 swift 2. can't figure out what's wrong.
thanks in advance
edit:
here's code:
func input(text:string) -> string { say(text) let alert:uialertcontroller = uialertcontroller(title: "goog", message: text, preferredstyle: uialertcontrollerstyle.alert) [alert .addtextfieldwithconfigurationhandler({ (textfield: uitextfield!) -> void in })] var returnvalue:string = "" let confirmaction = uialertaction( title: "ok", style: uialertactionstyle.default) {(action) in returnvalue = (alert.textfields[0] uitextfield).text! return } return returnvalue }
uialertcontroller *altsuccess = [uialertcontroller alertcontrollerwithtitle:@"success" message:@"login successfully" preferredstyle:uialertcontrollerstylealert]; uialertaction *oksuccess = [uialertaction actionwithtitle:@"ok" style:uialertactionstyledefault handler:^(uialertaction * action) { nslog(@"%@",[dict objectforkey:@"email"]); nslog(@"%@",[dict objectforkey:@"password"]); [altsuccess dismissviewcontrolleranimated:yes completion:nil]; }]; [altsuccess addaction:oksuccess]; [self presentviewcontroller:altsuccess animated:yes completion:nil]; its works fine...
Comments
Post a Comment