zoukankan      html  css  js  c++  java
  • iOS 随笔小技巧 弱self 打印当前类行数列数,多人开发自动适配pch地址,获取设备uid的信息

    $(SRCROOT)/PrefixHeader.pch自动适配pch地址

    __weak __block typeof(self) weakself = self;

      __weak typeof(self)weakSelf = self;

    #define DN_DEBUG_LOG(fmt, ...)  

    {NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }

     NSDictionary *ifs = [self fetchSSIDInfo];

        //NSString *ssid = [[ifs objectForKey:@"SSID"] lowercaseString];

        NSString *ssid =ifs[@"SSID"];

        NSLog(@"ifs --%@ , wifi设备名称--%@",ifs,ssid);

    - (id)fetchSSIDInfo {

        NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();

        //NSLog(@"Supported interfaces: %@", ifs);

        id info = nil;

        for (NSString *ifnam in ifs) {

            info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);

            //NSLog(@"%@ => %@", ifnam, info);

            if (info && [info count]) { break; }

        }

        return info;

    }

      //这句是支持汉字url编译

    //                NSString *strdn = [urlstr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

  • 相关阅读:
    Odd sum CodeForces
    Chips CodeForces
    Secrets CodeForces
    Voting CodeForces
    Jury Meeting CodeForces
    Planning CodeForces
    Maxim Buys an Apartment CodeForces
    Chemistry in Berland CodeForces
    Monitor CodeForces
    Four Segments CodeForces
  • 原文地址:https://www.cnblogs.com/soulDn/p/5336518.html
Copyright © 2011-2022 走看看