自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

迷路的猪

活着就有希望 ---史蒂芬.霍金

  • 博客(49)
  • 收藏
  • 关注

原创 iOS状态栏 白色

plist文件设置     View controller-based status bar appearance 为 NO;    Status bar style 为 UIStatusBarStyleLightContent

2018-06-17 09:54:14 434

原创 iOS tabbar 选中未选中

-(BaseNavigationController *)createVC:(NSString *)aClassName tabName:(NSString *)tabName image:(NSString *)image selectedImage:(NSString *)selectedImage{ UIViewController * vc = [[NSClassFromStri

2017-10-19 17:12:49 1137

原创 iOS 虚线圆

-(void)createDashline{ CAShapeLayer * line = [CAShapeLayer layer]; CGMutablePathRef path = CGPathCreateMutable(); line.fillColor = [UIColor clearColor].CGColor; line.strokeColor = [UI

2017-05-08 16:55:44 1165

原创 iosblock

-(id)initWithType:(DDAlertType)alertType title:(NSString *)title message:(NSString *)message btnName:(NSString *)btnName finished:(void(^)())onFinishedtypedef void(^DDblock)(NSDictionary *);@p

2017-04-13 16:20:33 396

原创 请求头添加UTF8编码

AFHTTPSessionManager *session = [AFHTTPSessionManager manager]; session.requestSerializer = [AFHTTPRequestSerializer serializer]; session.responseSerializer = [AFHTTPResponseSerializer seriali

2016-11-15 16:50:44 17505

原创 导航栏设置背景,去掉下面的黑线

[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"luckMoney_nav_bg"] forBarMetrics:UIBarMetricsDefault]; [self.navigationController.navigationBar setShadowImage:[UI

2016-11-10 10:12:03 349

原创 导航栏 透明

[self.navigationController.navigationBar setTranslucent:YES]; UIColor * color = [UIColor clearColor]; CGRect rect = CGRectMake(0, 0, KEY_WINDOW.width, 64); UIGraphicsBeginImageContext(rec

2016-11-10 10:11:07 284

原创 uinocde转中文UTF-8

uinocde转中文UTF-8在 NSString + additongs.m 中写下面-(NSString*) replaceUnicode{ NSString * TransformUnicodeString = self; NSString * tepStr1 = [TransformUnicodeString stringByReplacingO

2016-11-08 09:22:40 441

原创 UIWebview ScalesPageToFit 页面变小

1.webview加载表格遇到了问题,表格超出了当前的视图范围。2.我设置[_webView setScalesPageToFit:YES];3.但是自动缩小了。。。FK4.解决办法是不要[_webView setScalesPageToFit:YES];5.要计算body的宽度 NSString *bodyWidth= [webView stringByEvaluatingJav

2016-11-01 16:44:21 2616

原创 webview图片适应屏幕,图片可点击

-(void)webViewDidFinishLoad:(UIWebView *)webView{ [webView stringByEvaluatingJavaScriptFromString: @"var script = document.createElement('script');" "script.type = 'text/javascript';"

2016-10-25 10:06:53 368

原创 Code signing is required for product type 'Application' in SDK 'iOS 10.0'

Code signing is required for product type 'Application' in SDK 'iOS 10.0'选择自己的开发者账号

2016-10-23 14:19:39 419

原创 XCode8屏蔽系统log 真机调试NSLog没输出

屏蔽的方法如下:Xcode8里边 Edit Scheme-> Run -> Arguments, 在Environment Variables里边添加OS_ACTIVITY_MODE = Disable

2016-10-23 14:15:32 4786

转载 Mac OS下安装mysql及其简单使用

转:http://www.th7.cn/db/mysql/201504/101743.shtmlMac OS下安装mysql及其简单使用版权归Aaidong所有〜转载需声名〜  欢迎大家访问:http://blog.csdn.net/aaidong一、MySQL安装到MySQL官网上http://dev

2016-03-04 21:20:34 452

转载 Mac卸载MySQL

http://www.cnblogs.com/TsengYuen/archive/2011/12/06/2278574.html先停止所有mysql有关进程。1 sudo rm /usr/local/mysql2 sudo rm -rf /usr/local/mysql*3 sudo rm -rf /Library/StartupItems/MySQLCOM4 sudo rm

2016-03-04 21:13:35 299

转载 Mac 安装 MySQL

转:点我打开原文MAC系统自带apache和php,但是没有mysql,我在网上找到了一篇文章,简直堪称神器。刚开始用brew search mysql ...能找到,按照提示一步一步安装,结果到最后就是启动不起来,老提示一个sock相关的错误。。后来我还是直接到mysql 的官网下载了适合MAC 平台的 mysql-5.5.17-osx

2016-03-03 09:12:02 327

原创 ios9 简单粗暴总结

1.网络plist文件修改NSAppTransportSecurityNSAllowsArbitraryLoads2.瘦身build settingsenable bitcode -->NO3.白名单plist文件修改LSApplicationQueriesSchemes        wechat    weixin

2016-01-08 10:18:28 391

原创 ios 画虚线

需要 用到 CGContextSetLineDash此函数需要四个参数:context – 这个不用多说phase - 稍后再说lengths – 指明虚线是如何交替绘制,具体看例子count – lengths数组的长度CGContextRef context =UIGraphicsGetCurrentContext();  CGContextBegi

2015-07-03 09:54:27 437

原创 微博SDK 分享以后无法返回

1.在info.plist文件里增加url types,在url schems里填上wbXXXX(AppKey)2.确保SDK中设置的redirect_uri与新浪微博开放平台中设置的相同(相同即可,是什么无所谓)3.确保应用的bundle id(info.plist中的)与新浪微博开放平台中(应用基本信息里)设置的相同所有配置都正确,我在第二个问题上卡了,因为不知道谁在官网上

2015-07-02 10:47:11 398

原创 WeChatApiUtil EncodeBase64: 运行错误

吐槽完 微博的SDK 再来吐槽一下 微信 SDK 1.5 的大坑先列出 错误信息Undefined symbols for architecture i386:  "operator delete[](void*)", referenced from:      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeC

2015-07-02 10:42:41 1754

原创 新浪微博SDK抛出异常-[__NSDictionaryM weibosdk_WBSDKJSONString]:

不得不说 新浪微博那 SDK 做得很屎。[WeiboSDK registerApp: @"xxxxxxxx"];[__NSDictionaryM weibosdk_WBSDKJSONString] : unrecognized selector sent to instance 0x170255780官方文档说:在工程中引入静态库之后,需要在编译时添加  

2015-07-02 10:35:35 604

原创 状态栏高度改变 tabbar高度问题

一般开发的时候都会涉及到自定义tabbar,只是把原来的隐藏了然后再在原始tabbar的上面添加一层view,这个view一帮都是高度定死的,没有考虑的页面整体高度改变的时候tabbar的位置也要改变。有两点 1.接收 UIApplicationWillChangeStatusBarFrameNotification 通知来处理tabbar高度2.程序开始激活状态 调用 高度改变的方法

2015-01-09 09:18:52 917

原创 UITableView _endCellAnimationsWithContext section

[self.placementArrayremoveObjectAtIndex:indexPath.row];         if (self.placementArray.count == 0) {             [self.tableViewdeleteSections:[NSIndexSetindexSetWithIndex:indexPath.secti

2014-11-18 11:38:22 537

原创 tabbar 点击 两次 默认 返回 rootVC

tabbar 点击 两次 默认 返回 rootVC在项目我 我希望ta

2014-11-10 13:30:17 597

原创 NSArray 排序sortedArrayUsingComparator

-(IBAction)onPeriodChanged:(id)sender{    NSDictionary * data1 =@{@"value":@"0"};    NSDictionary * data2 =@{@"value":@"2.2"};    NSDictionary * data3 =@{@"value":@"2.1"};    NSDiction

2014-10-29 17:22:04 2050

原创 键盘 添加自定义按钮

- (void)keyboardDidShow:(NSNotification *)notification{    UIButton * _switchNumButton = [UIButtonbuttonWithType:UIButtonTypeCustom];    UIView * _keyboardDefaultView = [selfgetSystemKeyboar

2014-10-23 14:29:26 557

原创 Unwind Segue not working in iOS 8

http://stackoverflow.com/questions/25654941/unwind-segue-not-working-in-ios-8

2014-10-13 18:53:06 688

原创 颜色渐变

CAGradientLayer *gradient = [CAGradientLayer layer];  gradient.frame = rect;  gradient.colors = [NSArray arrayWithObjects:(id)[UIColor blackColor].CGColor,                                       

2014-10-13 09:24:41 457

原创 ios webview image 适应宽高

后台返回 一段- (void)webViewDidFinishLoad:(UIWebView *)webView{}

2014-07-17 09:45:36 1508

原创 视图的单个手指识别 exclusiveTouch

随便写几句。。恩恩UIView 的exclusiveTouch 的意思就是说UIView 会独占整个触摸事件。self.exclusiveTouch =YES; 这种情况下当前的View 是事件的第一响应者,所有手指离开之前其他的View是不会相应任何触摸事件的。这个貌似能解决 一个view 中有好多button 或者 有好多cell 同时点击时产生的问题。

2014-03-13 17:18:41 743

原创 BreatheLight 呼吸灯

今天无意间看到 小米手机在充电的时候 home键上的小灯 一闪一闪的 好像会呼吸,于是 联想到了在ios 视图上加上一个这个效果是不是会显得有生命力。。。呵呵呵。。随便写了几行代码#import @interface BreathLight : UIView@end#import "breathLight.h"@implementation breathLight-

2014-03-12 18:21:47 1295

原创 app store app 下架

找了很多方法,目前就知道三种进入 Price 界面1.时间选择到未来(到了未来app还会自己上架?)2.价格写到最高999美元(不靠谱)3.去掉所有的销售区域。(貌似这个可以)

2014-02-12 10:34:52 792

原创 ios7 后iTunes 不能打开评分页面

ios7后app 跳转app 评分页面 显示空白,原因是URL 改变了之前是这样写的itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_IDios7后改为itms-apps://itunes.app

2014-01-14 16:27:39 985

原创 ipad iphone model 让 键盘消失

Overriding disablesAutomaticKeyboardDismissal to return NO as below fixed the same problem of mine. You should put this code to your view controller, from which you initiate the keyboard:- (BOOL)dis

2014-01-12 20:49:19 828

原创 删除 文件夹下所有的 .svn

find . -name ".svn" -exec rm -rf {} \;或者find . -name ".svn" -type d -exec rm -rf {} \;

2014-01-12 20:46:12 628

原创 JsonKit 在xcode5 上报错

第一个:array->isa      = _JKArrayClass;第二个:dictionary->isa      = _JKDictionaryClass;解决办法:array->isa      = _JKArrayClass; 改成:object_setClass(array,_JKArrayClass);dictionary->isa      = _

2014-01-09 13:32:00 1786

原创 报错:Undefined symbols for architecture i386 "_deflate"

You didn't include the libz.dylib where those functions are. Select the project node, select your target, go to the Build Phases tab, expand "Link Binaries With Libraries", add libz.dylib, and try a

2014-01-09 13:25:36 615

原创 UILabel 自动适应宽度

#import @interface AutoSizeLabel : UILabel@end#import "AutoSizeLabel.h"@implementation AutoSizeLabel- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self)

2014-01-09 11:11:53 644

转载 ios 拨打电话 三种方法

1,这种方法,拨打完电话回不到原来的应用,会停留在通讯录里,而且是直接拨打,不弹出提示 NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"186xxxxxxxx"]; [[UIApplication sharedApplication] openURL:[NSURL URLWithSt

2014-01-06 13:13:19 911

转载 Android 异步加载图片

http://blog.csdn.net/geniusxiaoyu/article/details/7470163

2013-12-25 08:51:31 499

原创 FormatUtils java格式化 随笔

import java.text.DecimalFormat;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;public class FormatUtils {public static Date stringToDate(Strin

2013-12-12 08:41:39 911

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除