小编mad*_*ask的帖子

使用倍数信标(在每个不同的信标上弹出视图)

我在目标C初学者.我的应用程序与一个灯塔正常工作.我正在使用"estimote SDK".我有很多问题,我想使用2或3个信标.我想为每个信标推送一个View.

我不明白我怎么能用多个信标做到这一点.

  1. 我不知道是否必须使用多个信标管理器.(ESTBeaconManager*beaconManager)

  2. 我不知道如何将不同区域传递给didRangeBeacons :( NSArray*)beacons inRegion:(ESTBeaconRegion*)region

  3. 我可以使用一个信标仅用于通知,而另外两个用于在我们关闭时弹出2个不同视图.(每个信标的一个不同视图)

谢谢你的帮助.

最好的祝福.

码:

#import "ESTViewController.h"
#import "PresentViewController.h"
#import <ESTBeaconManager.h>
#import <AudioToolbox/AudioToolbox.h>

@interface ESTViewController () <ESTBeaconManagerDelegate>

@property (nonatomic, strong) ESTBeaconManager* beaconManager;
@property (nonatomic, strong) ESTBeaconManager* beaconManager2;
@property (nonatomic, strong) ESTBeaconManager* beaconManager3;

@property (nonatomic, strong) ESTBeacon* selectedBeacon;


@end

@implementation ESTViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    // should i create one manager instance or more ?

    self.beaconManager = [[ESTBeaconManager alloc] init];
    self.beaconManager.delegate = self;
    self.beaconManager.avoidUnknownStateBeacons = NO;

    //self.beaconManager2 = [[ESTBeaconManager alloc] init];
    //self.beaconManager2.delegate = …
Run Code Online (Sandbox Code Playgroud)

objective-c ios ibeacon estimote

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

Objective C error [__NSCFNumber length]:发送到实例的无法识别的选择器

我正在写一个基于tableView的应用程序.当我在tableView中使用默认单元格时,一切都很完美.当我尝试制作海关单元时,我有这个错误:

2014-12-01 22:50:01.690 Signaturegourmande[15701:624637] -[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000c3
2014-12-01 22:50:01.716 Signaturegourmande[15701:624637] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000c3'
Run Code Online (Sandbox Code Playgroud)

当我有这个代码时应用程序工作:

static NSString *simpleTableIdentifier = @"SimpleTableItem";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];

    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
    }

    cell.textLabel.text = [nomData objectAtIndex:indexPath.row];
    return cell;
Run Code Online (Sandbox Code Playgroud)

当我用这个替换代码时,我有错误:

static NSString *simpleTableIdentifier = @"ProduitCell";
    ProduitCell *cell = (ProduitCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
    if (cell == nil)
    {
        NSArray *nib …
Run Code Online (Sandbox Code Playgroud)

objective-c uitableview ios

2
推荐指数
1
解决办法
4997
查看次数

标签 统计

ios ×2

objective-c ×2

estimote ×1

ibeacon ×1

uitableview ×1