<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sandy_shell的专栏]]></title><description><![CDATA[记录点滴。。。]]></description><link>https://blog.youkuaiyun.com/sandy_shell</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sandy_shell]]></copyright><item><title><![CDATA[runtime学习之 model 转dict]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/72844908</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/72844908</guid><author>sandy_shell</author><pubDate>Fri, 02 Jun 2017 15:39:49 +0800</pubDate><description><![CDATA[-(NSDictionary *) dictionary{
    unsigned
int outCount = 0;
    objc_property_t *propertyList =
class_copyPropertyList([self
class], &outCount);


    NSMutableDictionary *dict = [NSMutableDi]]></description><category></category></item><item><title><![CDATA[ios启动页命名规则]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/51105694</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/51105694</guid><author>sandy_shell</author><pubDate>Sat, 09 Apr 2016 16:11:48 +0800</pubDate><description><![CDATA[因为ios8之后有了luanchScreen，所以这里先不考虑iphone6，6plus的命名。
在ios8以下，启动页有两种加载方式，一种是不指定命名，把图片放到项目中，将会自动加载。
这种则需要按如下方式命名:
640*960： Default@2x.png
640*1136: Default-568h@2x.png


还有一种在infoPlist文件中指定"UILaunchI]]></description><category></category></item><item><title><![CDATA[获取SSID]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/51026556</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/51026556</guid><author>sandy_shell</author><pubDate>Thu, 31 Mar 2016 14:56:59 +0800</pubDate><description><![CDATA[导入头文件
#import 


获取

- (NSDictionary *)fetchSSIDInfo
{
    NSArray *interfaceNames =
CFBridgingRelease(CNCopySupportedInterfaces());
    DebugNSLog(@"%s: Supported interfaces: %@",
__func__]]></description><category></category></item><item><title><![CDATA[让build自动增长的脚本]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50837282</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50837282</guid><author>sandy_shell</author><pubDate>Wed, 09 Mar 2016 17:45:55 +0800</pubDate><description><![CDATA[buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion"
"$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber"
"$INFOPLIST_FIL]]></description><category></category></item><item><title><![CDATA[cocopods的安装和使用]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50358797</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50358797</guid><author>sandy_shell</author><pubDate>Sat, 19 Dec 2015 16:32:47 +0800</pubDate><description><![CDATA[上篇文章已经安装好cocopods所需的ruby环境了
现在开始安装cocopods。
安装cocopods很简单，一条命令即可:
sudo gem install cocoapods 
等安装完成之后，就可以使用了。
例子：新建一个工程PodTest，使用AFNetworking
在终端cd 到该目录下，然后执行命令 vim Podfile
然后在Podfile文件中输入以下文字：]]></description><category></category></item><item><title><![CDATA[Ruby安装]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50358667</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50358667</guid><author>sandy_shell</author><pubDate>Sat, 19 Dec 2015 16:12:09 +0800</pubDate><description><![CDATA[想使用cocopods，从网上找了下，需要安装ruby。
以下是我安装ruby的过程
步骤1:安装RVM
在终端执行命令:
$ curl -L https://get.rvm.io | bash -s stable直接执行这条命令，可能几分钟之后就会提示你timeout，没有任何响应，稍好一点的就是提示无法连接到git上的某个地址。不论试多少次都是一样。其实 只要登录git账号即可。登录g]]></description><category></category></item><item><title><![CDATA[关于今天扩展界面不显示出来的问题]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50349644</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50349644</guid><author>sandy_shell</author><pubDate>Fri, 18 Dec 2015 09:45:46 +0800</pubDate><description><![CDATA[在项目中加了扩展，在ios9上显示的好好的，可是跑ios8上就界面显示不出来。扩展中有我的项目，可是就是没界面，看了下布局，没有任何警告。
折腾了好久，后面在viewDidLoad的时候设置了下preferredContentSize的大小，然后立马就出来了。
self.preferredContentSize =
CGSizeMake([[UIScreen
mainScreen] bou]]></description><category></category></item><item><title><![CDATA[输入文本校验]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50265993</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50265993</guid><author>sandy_shell</author><pubDate>Fri, 11 Dec 2015 16:55:47 +0800</pubDate><description><![CDATA[if (isChinese){
        strRegex = @"^([\\u4e00-\\u9fa5])+|(^([\\u4e00-\\u9fa5])+[0-9]+)+"; //只能中文加数字，且数字必须在后面
    }else{
        strRegex = @"[A-Za-z\\s]+|([A-Za-z\\s]+[0-9]+)+";
    }


邮箱校验:]]></description><category></category></item><item><title><![CDATA[字符串与16进制的转换]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/50250883</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/50250883</guid><author>sandy_shell</author><pubDate>Thu, 10 Dec 2015 16:00:40 +0800</pubDate><description><![CDATA[//把字符串转换成十六进制字符串
+ (NSString *)hexStringFromString:(NSString *)string{
    NSData *myD = [string
dataUsingEncoding:NSUTF8StringEncoding];
    Byte *bytes = (Byte *)[myD
bytes];
    //下面是Byte
转换]]></description><category></category></item><item><title><![CDATA[Xcode7 使用动态链接库]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/49247045</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/49247045</guid><author>sandy_shell</author><pubDate>Mon, 19 Oct 2015 10:48:30 +0800</pubDate><description><![CDATA[在xcode7中，动态链接库.dylib 都改成tbd文件。
在普通的工程中直接引入tbd文件，然后像导入.dylib一样使用即可。
但是如果制作静态库framework，则不能在公开的头文件中导入动态库的头文件，否则会报错:
include modular header inside framework module]]></description><category></category></item><item><title><![CDATA[解决IOS8上无法创建同名删除相册的问题]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/48269271</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/48269271</guid><author>sandy_shell</author><pubDate>Mon, 07 Sep 2015 17:47:08 +0800</pubDate><description><![CDATA[在IOS上，如果用ALAssertLibrary创建相册，如果该相册被删除过了，则再次创建，会创建成功，但是group为nil

[self
addAssetsGroupAlbumWithName:albumName
                                                         
resultBlock:^(ALAssetsGroup ]]></description><category></category></item><item><title><![CDATA[app 首次启动]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/43486771</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/43486771</guid><author>sandy_shell</author><pubDate>Wed, 04 Feb 2015 15:18:31 +0800</pubDate><description><![CDATA[在AppdidFinishLaunched中添加   

 if (![[NSUserDefaults
standardUserDefaults] boolForKey:@"everLaunched"])
    {

        [[NSUserDefaults
standardUserDefaults] setBool:YES
forKey:@"everLaunched"]]]></description><category></category></item><item><title><![CDATA[关于Xcode无法查看到内存情况.]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/41944221</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/41944221</guid><author>sandy_shell</author><pubDate>Mon, 15 Dec 2014 15:30:40 +0800</pubDate><description><![CDATA[在xcode6 上运行旧的项目，发现无法查看到内存。后面发现新的项目上可以查看到内存使用情况.后面对比了一下两个的设置配置。终于发现，原来是在项目的scheme 设置中，Diagnostics 下的一个Enable Zommbie Object 这个选项给勾上了。把这个选项去掉，就可以查看到内存使用情况了。Xcode6 应该是在僵尸模式下查看不了内存。]]></description><category></category></item><item><title><![CDATA[lipo 指令]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/41806291</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/41806291</guid><author>sandy_shell</author><pubDate>Mon, 08 Dec 2014 17:47:11 +0800</pubDate><description><![CDATA[查看lib所支持的指令集：lipo -info *.lib
合成指令集： lipo -create XXXX_V7.a XXXX_V7s.a -output XXXX_all.a 合成他们成为新的.a文件。


解压指令集:

lipo IOTCamera -thin armv7s -output IOTCamera_armv7s


把库文件的.o 文件解压出来
ar -x ]]></description><category></category></item><item><title><![CDATA[把char *的数据转换成图片]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/41548139</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/41548139</guid><author>sandy_shell</author><pubDate>Thu, 27 Nov 2014 16:21:05 +0800</pubDate><description><![CDATA[CGColorSpaceRef colorSpace = 
CGColorSpaceCreateDeviceRGB();
           
CGContextRef ctx = 
CGBitmapContextCreate(pScreenBmpStore->pData_buff,imageWidth,imageHeight,
8  ,nBytes_per_Row , colorSp]]></description><category></category></item><item><title><![CDATA[IOS7权限检测]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/38758653</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/38758653</guid><author>sandy_shell</author><pubDate>Fri, 22 Aug 2014 16:33:46 +0800</pubDate><description><![CDATA[ios7开始，用户可以在设置->隐私->中开启或关闭某些系统权限，比如]]></description><category></category></item><item><title><![CDATA[ip地址获取]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/38727107</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/38727107</guid><author>sandy_shell</author><pubDate>Thu, 21 Aug 2014 11:05:27 +0800</pubDate><description><![CDATA[+(NSString *)getIPAddress {

    
    
if (mLocalIP != 
nil) {
        
return mLocalIP;
    }

    
    
struct ifaddrs *interfaces = 
NULL;
    
struct ifaddrs *temp_addr = 
NULL;
 ]]></description><category></category></item><item><title><![CDATA[NSPredicate的使用]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/35262015</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/35262015</guid><author>sandy_shell</author><pubDate>Fri, 27 Jun 2014 14:59:41 +0800</pubDate><description><![CDATA[正则表达式的使用
1.邮箱地址校验

-(BOOL) isValidEmail:(NSString *)str
{




    NSString *strRegex =
@"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{1,3}";
    
NSPredicate *predicate = [NSPredicate 
pre]]></description><category></category></item><item><title><![CDATA[使用CAShaper实现圆的填充]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/34455263</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/34455263</guid><author>sandy_shell</author><pubDate>Wed, 25 Jun 2014 17:40:44 +0800</pubDate><description><![CDATA[shou

circleLayer = [CAShapeLayer
layer];
    
circleLayer.frame = 
CGRectMake(100, 
120, 64, 64);

    circleLayer.backgroundColor = [UIColor
clearColor].CGColor
    ;

    circleLayer.f]]></description><category></category></item><item><title><![CDATA[[IOS]使用genstrings和NSLocalizedString实现App文本的本地化]]></title><link>https://blog.youkuaiyun.com/sandy_shell/article/details/25409369</link><guid>https://blog.youkuaiyun.com/sandy_shell/article/details/25409369</guid><author>sandy_shell</author><pubDate>Fri, 09 May 2014 16:51:24 +0800</pubDate><description><![CDATA[App本地化的需要不用讲大家也都明白，本文将介绍一种简单的方法来实现字符串的本地化。

在不考虑本地化的情况下，我们如果在代码中给一个Button定义title，一般会这样写：

btn.titleLable.text = @"Example Button";


 

也许我们已经写了很长的代码才考虑到本地化的问题，大可不必头疼，这时候，我们要做的是把代码从头扫一遍，然后把每个]]></description><category></category></item></channel></rss>