我正在尝试添加UIAlertController到我的应用程序,但它根本没有出现.我尝试过以下方法:
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Message" message:@"Web Service is not available." preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil];
[alertController addAction:ok];
[self presentViewController:alertController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
但这根本没有出现,我做错了什么?
我从这行代码中得到了上面标题中的错误:
\n\nHttpCookie authCookie = Context.Request.Cookies[cookieName];\nRun Code Online (Sandbox Code Playgroud)\n\n有什么我忘记使用的吗?
\n\n\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0
\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing System.Web.Security;\nusing System.Security.Principal;\nRun Code Online (Sandbox Code Playgroud)\n 我收到标题错误,但我不知道为什么......
。H
@interface ItemData : NSObject
@property (nonatomic,assign) NSInteger tagId;
@property (nonatomic,strong) NSMutableString *deviceId;
@property (nonatomic,strong) NSDecimal *latitude;
@property (nonatomic,strong) NSDecimal *longitude;
@end
Run Code Online (Sandbox Code Playgroud)
.米
#import <Foundation/Foundation.h>
#import "ItemData.h"
@implementation ItemData
-(id)init
{
if(self = [super init])
{
//TODO: Fix Commented out items
_tagId = [[NSInteger alloc] init];
_deviceId = [[NSMutableString alloc] init];
_latitude = [[NSDecimal alloc] init];
_longitude = [[NSDecimal alloc] init];
}
return self;
}
@end
Run Code Online (Sandbox Code Playgroud)
我不明白我做错了什么......有人可以帮助我吗?