小编Mag*_*oss的帖子

UIAlertController根本没有出现

我正在尝试添加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)

但这根本没有出现,我做错了什么?

objective-c ios uialertcontroller

9
推荐指数
1
解决办法
5624
查看次数

ASP.NET - 当前上下文中不存在名称“Context”

我从这行代码中得到了上面标题中的错误:

\n\n
HttpCookie authCookie = Context.Request.Cookies[cookieName];\n
Run Code Online (Sandbox Code Playgroud)\n\n

有什么我忘记使用的吗?

\n\n

\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0

\n\n
using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing System.Web.Security;\nusing System.Security.Principal;\n
Run Code Online (Sandbox Code Playgroud)\n

c# asp.net asp.net-mvc

6
推荐指数
1
解决办法
9437
查看次数

Objective-C - 接收器类型“NSInteger”(又名“long”)不是 Objective-C 类,并且接收器类型“NSDecimal”不是 Objective-C 类

我收到标题错误,但我不知道为什么......

。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)

我不明白我做错了什么......有人可以帮助我吗?

objective-c ios

5
推荐指数
1
解决办法
9271
查看次数

标签 统计

ios ×2

objective-c ×2

asp.net ×1

asp.net-mvc ×1

c# ×1

uialertcontroller ×1