29,027
社区成员
发帖
与我相关
我的任务
分享
@protocol MyPeripheralDelegate<NSObject>
@optional
- (void)MyPeripheral:(MyPeripheral *)peripheral didReceiveTransparentData:(NSData *)data;
@end
@interface BLKWrite : NSObject<MyPeripheralDelegate>
@property (nonatomic, strong) MyPeripheral *connectedPeripheral;
@property (nonatomic, assign) BOOL bWiFiMode; //YES: Wi-Fi模式;NO:蓝牙模式
@property (nonatomic, strong) NSString *serverIP;
@property (nonatomic, assign) int port;
+(BLKWrite*) Instance;
-(void) writeTscData:(NSData*) data withResponse:(BOOL) flag;
-(void) writeEscData:(NSData*) data withResponse:(BOOL) flag;
-(BOOL) isConnecting;
-(void) setPeripheral:(MyPeripheral*) peripheral;
#pragma mark-Wi-Fi Mode
-(void) initWiFiClient;
-(int) PrintWidth;
@end
@interface ViewController : UIViewController
好像oc不支持多继承
.m里是这样的
@interface ViewController ()<UITextFieldDelegate>
@property(nonatomic, weak) UITextField *mCurrentUITextField;
typedef struct ARGBPixel{
u_int8_t red;
u_int8_t green;
u_int8_t blue;
u_int8_t alpha;
}ARGBPixel;
@end
@implementation ViewController