iOS常见bug

1、

Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithAddress", referenced from:
"_SCNetworkReachabilityGetFlags", referenced from:

解决办法:添加SystemConfiguration.framework

2.这个是引用NSDataAdditions时出现的bug,

"_deflate", referenced from:
      -[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
  "_deflateEnd", referenced from:
      -[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
  "_deflateInit2_", referenced from:
      -[NSData(NSDataAdditions) gzipDeflate] in NSDataAdditions.o
  "_inflate", referenced from:
      -[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o
  "_inflateEnd", referenced from:
      -[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o
  "_inflateInit2_", referenced from:
      -[NSData(NSDataAdditions) gzipInflate] in NSDataAdditions.o

解决办法:添加libz.dylib类库

  1. selector警告
performSelector may cause a leak because its selector is unknown

触发原因

SEL sel = @selector(touch:);
[self performSelector:sel withObject:textField];

解决办法

#import 
SEL sel = @selector(touch:);
objc_msgSend(self, sel, textField);// textField为touch:后跟的参数,如有多个参数,用','连接即可

如有问题也可留言大家一起学习解决

来源自网络

你可能感兴趣的:(iOS常见bug)