`
wfkbyni
  • 浏览: 85088 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表
先从 www.ffmpeg.org下载ffmpeg 然后: /Users/mac/Desktop/SnowLeopard_Lion_Mountain_Lion_Mavericks_12.12.2015/ffmpeg -i d0019utlj48.mp4 -acodec libvorbis d0019utlj48.ogg  注:ffmpeg在电脑上的位置  -i 源视频的名字 -acodec libvorbis 新视频的名字

block语法

How Do I Declare A Block in Objective-C? As a local variable: 1. returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...}; 2. @property (nonatomic, copy) returnType (^blockName)(parameterTypes); 3. - (void)someMethodThatTakesABlock:(returnType (^)(parameterTypes))blockName; 4. [so ...
在webViewDidFinishLoad调用: - (void)webViewDidFinishLoad:(UIWebView *)webView{         NSArray *subViewArray = webView.subviews;         for (UIView *view in subViewArray) {         NSArray* array = view.subviews;         for (UIView *view in array) {             [self removeGesture:view];         }   ...
.h // //  PublicTableView.h //  JointCrm // //  Created by Mac on 15/10/27. //  Copyright © 2015年 Mac. All rights reserved. // #import <UIKit/UIKit.h> typedef void(^TableBlock)(UITableView *tableView,NSIndexPath *indexPath); @interface PublicTableView : UITableView /** *  定义一个公共的TableView, ...
好久没有写ios了,这篇文章主要是记录一些看到的不错的文章: 1.解决请求并发的问题。 http://www.cocoachina.com/ios/20151009/13579.html 2.layer相关的东西 http://www.cocoachina.com/ios/20141022/10005.html 3.自动布局 Auto Layout 使用心得(一)—— 初体验 https://lvwenhan.com/ios/430.html 4.iOS开发之runtime的运用-获取当前网络状态 http://www.360doc.com/content/14/0403/14/1625 ...

封装录音View

使用方法: 直接把XHRecrodView添加到controller可实现像微信那样的语音通话 // 添加录音view     XHRecrodView* recrodView = [[XHRecrodView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_textview.frame) + 20, SCREEN_WIDTH, 100)];     [self.view addSubview:recrodView];
.h #import <Foundation/Foundation.h> typedef void(^SuccessBlock)(NSString *dataString); typedef void(^FialdBlock)(NSString *dataString); @interface HttpRequest : NSObject +(void)requestWtihParams:(NSDictionary *)params         withSuccessBlock:(SuccessBlock)successBlock           wihtFiladB ...
// 压缩图片,如果图片大于100kb,就循环压缩 + (NSData *)compressionWithImage:(UIImage *)image{         // 先按宽度压缩     UIImage *newImage = [image resizeImageGreaterThan:480];         NSData *data;     float quality = 1.0f;     if (UIImageJPEGRepresentation(newImage, quality)) {         data = UIImageJPEGRepresentation ...

weakSelf

快速的定义一个weakSelf 当然是用于block里面啦 #define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
解决ios7 UINavigationItem 位置偏移问题 #import <UIKit/UIKit.h> @interface UINavigationItem (Spacing) -(void)mySetLeftBarButtonItem:(UIBarButtonItem*)barButton; -(void)mySetRigthBarButtonItem:(UIBarButtonItem*)barButton; @end #import "UINavigationItem+Spacing.h" #import <objc/runtime ...
做icon和启动图按这个尺寸来
UIImage *image=[UIImage imageNamed:@"xxoo.jpeg"];     NSData  *imageData=UIImageJPEGRepresentation(image, 1.f);     CGFloat size=40.f;// kb     CGFloat scale=size/(imageData.length/1024);     NSData *newData=UIImageJPEGRepresentation(image, scale);
+(NSInteger) indexWeekOfDateInMonth:(NSDate*)date_ {         NSCalendar *calendar = [NSCalendar currentCalendar];     NSDateComponents* components = [calendar components:NSYearCalendarUnit| NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekCalendarUnit |  NSHourCalendarUnit | NSMinuteCalendarUnit | NS ...
iOS开发的一些奇巧淫技  http://www.cocoachina.com/ios/20141229/10783.html TableView不显示没内容的Cell怎么办? 类似这种,我不想让下面那些空的显示. 01.png 很简单. self.tableView.tableFooterView = [[UIView alloc] init]; 试过的都说好. 加完这句之后就变成了这样. 02.png 自定义了leftBarbuttonItem左滑返回手势失效了怎么办?     self.navigationItem.leftBarButtonItem = [[U ...
转自: http://www.tuicool.com/articles/JFRfmq // //  HttpRequest.h //  UseBlockCallBack // //  Created by Michael on 2/13/14. //  Copyright (c) 2014 EIMS. All rights reserved. // #import <Foundation/Foundation.h> typedef void (^FinishBlock)(NSString *dataString); @interface HttpRequest : NSO ...
Global site tag (gtag.js) - Google Analytics