#import"ViewController.h"
#import
#import
@interfaceViewController()
@property(weak,nonatomic)IBOutletUITextField*textfield;
@implementationViewController
- (void)viewDidLoad {
[superviewDidLoad];
//保存
AVObject*post=[AVObjectobjectWithClassName:@"Post"];
[postsetObject:@"wei"forKey:@"haha"];
[postsetObject:@"meng"forKey:@"heihei"];
[postsetObject:@"xue"forKey:@"woyun"];
[postsave];
//检索
AVQuery*query=[AVQueryqueryWithClassName:@"Post"];
AVObject*post1=[querygetObjectWithId:@"45iit23sx8hr6ev1jyf97yc47j7xjn9kblf4sqsb6uj40tg9"];
NSString*s1=[post1objectForKey:@"heihei"];
NSLog(@"%@",s1);
[postdeleteInBackground];
}
//请求验证码
- (IBAction)sendpassword:(id)sender {
[AVOSCloud requestSmsCodeWithPhoneNumber:@"13240109524"appName:@"秒"operation:@"注册"timeToLive:10callback:^(BOOLsucceeded, NSError *error) {
if(succeeded) {
NSLog(@"成功");
}
if(error) {
NSLog(@"error");
}
}];
}
//验证验证码
- (IBAction)sendmessage:(id)sender {
[AVOSCloud verifySmsCode:self.textfield.text mobilePhoneNumber:@"13240109524"callback:^(BOOLsucceeded, NSError *error) {
if(succeeded) {
NSLog(@"验证成功");
}
}];
}
- (IBAction)message:(id)sender {
}
- (void)didReceiveMemoryWarning {
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
网友评论