objective c - iOS delegate method definition syntax -
how understand next syntax:
-(void) centralmanager:(cbcentralmanager *)central diddiscoverperipheral:(cbperipheral *) advertisementdata:.....
so method name diddiscoverperipheral, why central parameter defined first?
the method name centralmanager:diddiscoverperipheral:advertisementdata:
.
the first parameter tells manager discovered peripheral. you'd otherwise have no thought talking you. it's standard practice delegate protocols in case want talk back.
ios objective-c
No comments:
Post a Comment