mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
allow to show custom activity text
This commit is contained in:
parent
86fccfd62b
commit
9ef40a1964
@ -52,10 +52,12 @@ typedef enum {
|
|||||||
int remoteNameIndex;
|
int remoteNameIndex;
|
||||||
BOOL showIcons;
|
BOOL showIcons;
|
||||||
int connectingIndex;
|
int connectingIndex;
|
||||||
|
NSString *customActivityText;
|
||||||
}
|
}
|
||||||
-(void) markConnecting:(int)index; // use -1 for no connection active
|
-(void) markConnecting:(int)index; // use -1 for no connection active
|
||||||
@property (nonatomic, assign) NSObject<BTDiscoveryDelegate> * delegate;
|
@property (nonatomic, assign) NSObject<BTDiscoveryDelegate> * delegate;
|
||||||
@property (nonatomic, assign) BOOL showIcons;
|
@property (nonatomic, assign) BOOL showIcons;
|
||||||
|
@property (nonatomic, retain) NSString *customActivityText;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@protocol BTDiscoveryDelegate
|
@protocol BTDiscoveryDelegate
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
@implementation BTDiscoveryViewController
|
@implementation BTDiscoveryViewController
|
||||||
@synthesize showIcons;
|
@synthesize showIcons;
|
||||||
@synthesize delegate = _delegate;
|
@synthesize delegate = _delegate;
|
||||||
|
@synthesize customActivityText;
|
||||||
|
|
||||||
- (id) init {
|
- (id) init {
|
||||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||||
@ -195,7 +196,10 @@
|
|||||||
|
|
||||||
int idx = [indexPath indexAtPosition:1];
|
int idx = [indexPath indexAtPosition:1];
|
||||||
if (idx >= [bt numberOfDevicesFound]) {
|
if (idx >= [bt numberOfDevicesFound]) {
|
||||||
if ([bt isActivating]){
|
if (customActivityText) {
|
||||||
|
theLabel = customActivityText;
|
||||||
|
cell.accessoryView = bluetoothActivity;
|
||||||
|
} else if ([bt isActivating]){
|
||||||
theLabel = @"Activating BTstack...";
|
theLabel = @"Activating BTstack...";
|
||||||
cell.accessoryView = bluetoothActivity;
|
cell.accessoryView = bluetoothActivity;
|
||||||
} else if (![bt isActive]){
|
} else if (![bt isActive]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user