带iphone的插座
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了带iphone的插座相关的知识,希望对你有一定的参考价值。
da testare
if (![urlStr isEqualToString:@""]) { if (!website) { NSLog(@"%@ is not a valid URL"); return; } [iStream retain]; [oStream retain]; [iStream setDelegate:self]; [oStream setDelegate:self]; [iStream open]; [oStream open]; } { NSString *io; if (theStream == iStream) io = @">>"; else io = @"<<"; NSString *event; switch (streamEvent) { case NSStreamEventNone: event = @"NSStreamEventNone"; resultText.font = [UIFont fontWithName:@"Helvetica" size:10.0]; resultText.textColor = [UIColor whiteColor]; break; case NSStreamEventOpenCompleted: event = @"NSStreamEventOpenCompleted"; break; case NSStreamEventHasBytesAvailable: event = @"NSStreamEventHasBytesAvailable"; if (theStream == iStream) { uint8_t buffer[1024]; int len; while ([iStream hasBytesAvailable]) { if (len > 0) { if (nil != output) { //NSArray *arr = [output componentsSeparatedByString:@" "]; resultText.font = [UIFont fontWithName:@"Helvetica" size:10.0]; resultText.textColor = [UIColor whiteColor]; NSLog(@"%@", output); [output release]; } } } } break; case NSStreamEventHasSpaceAvailable: event = @"NSStreamEventHasSpaceAvailable"; break; case NSStreamEventErrorOccurred: event = @"NSStreamEventErrorOccurred"; resultText.font = [UIFont fontWithName:@"Helvetica" size:10.0]; resultText.textColor = [UIColor whiteColor]; break; case NSStreamEventEndEncountered: event = @"NSStreamEventEndEncountered"; [theStream close]; [theStream release]; theStream = nil; break; default: event = @"** Unknown"; } NSLog(@"%@ : %@", io, event); }
以上是关于带iphone的插座的主要内容,如果未能解决你的问题,请参考以下文章
如何使用 iphone 磁力计值计算来自墙壁插座的电流电压值?