.h
// convinent methods
@property (readonly, nonatomic) BOOL isConnected;
.m
-(BOOL)isConnected
{
return self.currentPeripheral.state == CBPeripheralStateConnected;
}
其實也就是複寫isConnected由property自動生成的getter method啦!
其實也就是複寫isConnected由property自動生成的getter method啦!