- 博客(23)
- 资源 (3)
- 收藏
- 关注
原创 cocoapods 安装
cocoapods安装1>.//删除官方的ruby环境gem sources --remove https://rubygems.org/2>. //等有反应之后再敲入以下命令gem sources -a http://ruby.taobao.org/3>.为了验证你的Ruby镜像是并且仅是taobaogem sources -l显示为ruby.
2016-04-05 18:26:15
380
原创 透明导航条
/** * 初始化透明Navbar */- (void)initlizerNavBarStype{ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; self.navigationController.navigationBar.translucent =
2016-01-23 15:49:59
562
原创 群发短信 发短信(带图片)
/** * 群发短信 * * @paramshareImage */- (void)sendSMS:(UIImage*)shareImage withMoblieList:(NSArray*)mobileList{ MFMessageComposeViewController*picker = [[MFMessageComposeVi
2015-08-22 13:23:18
2307
原创 一个矩形是否包含一个点
1.一个矩形是否包含一个点CGRectContainsPoint(, )2.一个矩形是否包含另一个矩形CGRectContainsRect(, )
2015-08-22 13:22:06
1057
原创 view 在父view 拖动不过边界(UIPanGestureRecognizer)
- (void)viewDidPan:(UIPanGestureRecognizer*)sender{ CGPoint p = [sender translationInView:self.superview]; if(sender.state== UIGestureRecognizerStateBegan){ _initial
2015-08-22 13:21:03
2005
转载 Font 根据路径返回字体(TTF)
-(UIFont*)customFontWithPath:(NSString*)path size:(CGFloat)size{ NSURL *fontUrl = [NSURL fileURLWithPath:path]; CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((__br
2015-08-22 13:18:58
2007
原创 openssl rsa.h file not found
Header Search Paths 问题解决方法:项目里边找到文件夹,直接拖到Header Search Paths 会生成一个路径然后去掉””就可以了
2015-08-22 13:16:21
1088
原创 TTTAttributedLabel 使用
https://github.com/mattt/TTTAttributedLabel- (TTTAttributedLabel *)initlizerLinkLabel:(NSString *)content WithUserName:(NSString *)userName
2014-09-26 09:48:17
3514
转载 计算两个经纬度之前的距离
方法一- (double)caluteDistance:(double)lat1 :(double)lat2 :(double)lon1 :(double)lon2{ CLLocation *location1 = [[CLLocation alloc] initWithLatitude:lat1 longitude:lon1]; CLLocation *location2
2014-09-26 09:44:08
820
转载 截屏代码 地图
CGImageRef UIGetScreenImage();- (UIImage *)captureScreenImage{ @autoreleasepool { CGImageRef cgImage = UIGetScreenImage(); void *imageBytes = NULL; if (cgImage == NULL) {
2014-08-20 20:10:58
575
转载 .弧度转角度/角度转弧度
iphone里面角度和弧度经常要转换,比如旋转一个图片,你要用到CGAffineTransformMakeRotation,他就需要一个弧度值做完输入。下面是两个宏,来实现互转1.弧度转角度#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))NSLog(@"Output radians as d
2014-08-06 23:48:12
2132
原创 button 修改 title 和 image偏移量
实现button hh[button setImageEdgeInsets:UIEdgeInsetsMake(, , , )];同时还可以设置文字的偏移量:[button setTitleEdgeInsets:UIEdgeInsetsMake(, , , )];
2014-07-30 10:25:28
1006
原创 makeObjectsPerformSelector 方法的用法
nsarray 类定义的方法1. makeObjectsPerformSelector:@select(aMethod)简介:让数组中的每个元素 都调用 aMethod 2. makeObjectsPerformSelector:@select(aMethod) withObject:oneObject简介:让数组中
2014-07-29 11:01:13
1291
原创 GPUImage 正片叠底效果
GPUImagePicture *stillImageSource1 = [[GPUImagePicturealloc] initWithImage:_overImage]; GPUImagePicture *stillImageSource2 = [[GPUImagePicturealloc] initWithImage:_contentImage];
2014-07-27 17:30:20
2692
原创 struct 转对象(NSValue)
1.struct aStruct{ int a; int b;};typedef struct aStruct aStruct;2.aStruct struct; struct.a = 0; struct.b = 0;NSValue *anObj = [NSValue value:&struct withObjCType:@encode(aStruct)];NSArr
2014-07-17 11:58:03
1961
原创 UIView+Border(添加任意一边)
CALayer *bottomBorder = [CALayer layer]; bottomBorder.frame = CGRectMake(0.0f, 0.0f, 1.0f, btnValite.frame.size.height); bottomBorder.backgroundColor = [UIColor colorWithWhite:0.8f
2014-07-14 14:08:21
7812
原创 Uibutton 左对齐
Uibutton *button = [UIButton buttonWithType:UIButtonTypeCustom];button = CGRectMake(10, 0, 60, selectView.frame.size.height);[button setTitle:self.energyParamName forState:UIControlStateNormal];
2014-06-23 10:43:23
722
转载 几个键盘通知
几个键盘通知 每次都要找 还是记录一下吧[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:)
2014-06-11 14:27:10
605
原创 关于iOS强制横屏
关于iOS强制横屏所有都是竖屏只有一个是横屏的情况首先要添加支持转屏在RootViewController加上下面代码- (BOOL)shouldAutorotate{//这个是控制是否可以转屏 return NO;}- (NSUInteger)supportedInterfaceOrientations {//这个是支持哪些方向 return UI
2014-06-10 20:53:45
1386
原创 swift学习
Objective-C和Swift混合编程开发(一)http://blog.diveinedu.net/objective-c-swift-framework-dev/Swift与Objective-C API交互(一)http://blog.diveinedu.net/swift_objective_c_api_interactive_1/Swift与Objective-
2014-06-06 11:20:28
1232
转载 改变状态栏字体颜色 (转)
1.在info.plist里面添加字段key----Viewcontroller-based status bar appearancevalue---NO 在appDelegate里面添加代码:[[UIApplicationsharedApplication]setStatusBarHidden:NOwithAnimatio
2014-03-31 14:04:29
874
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人