我在目标C初学者.我的应用程序与一个灯塔正常工作.我正在使用"estimote SDK".我有很多问题,我想使用2或3个信标.我想为每个信标推送一个View.
我不明白我怎么能用多个信标做到这一点.
我不知道是否必须使用多个信标管理器.(ESTBeaconManager*beaconManager)
我不知道如何将不同区域传递给didRangeBeacons :( NSArray*)beacons inRegion:(ESTBeaconRegion*)region
我可以使用一个信标仅用于通知,而另外两个用于在我们关闭时弹出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) 我正在写一个基于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)