原创 iOS複製內容到剪切版

UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.string = @"呵呵噠"; 點贊 收藏 分享 文

原创 iOS實現彈幕功能

KSBarrageView:https://github.com/Jonear/KSBarrageView CrazyPeter:https://github.com/CrazyPeter/DanmukuMaster-iOS B

原创 iPad開發強制橫屏

-(NSUInteger)supportedInterfaceOrientations{//強制橫屏     return UIInterfaceOrientationMaskLandscape; } 點贊 收藏

原创 iOS自定義cell導致數據加載混亂

轉載自:http://www.2cto.com/kf/201308/238449.html UITableView繼承自UIScrollview,是蘋果爲我們封裝好的一個基於scroll的控件。上面主要是一個個的UITableViewC

原创 iOS UINavigationBar + UITabBar

    //TabBar     UITabBarController *tabBarCtrl = [[UITabBarController alloc]init];     tabBarCtrl.tabBar.background

原创 iOS NSIndexPath

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];

原创 iOS網絡編程

原文地址:http://www.mamicode.com/info-detail-877996.html 一、網絡各個協議:TCP/IP、SOCKET、HTTP等 網絡七層由下往上分別爲物理層、數據鏈路層、網絡層、傳輸層、會話層、表

原创 iOS 中KVC、KVO、NSNotification、delegate 總結及區別

原文鏈接:http://www.mamicode.com/info-detail-515516.html 1、KVC,即是指 NSKeyValueCoding,一個非正式的Protocol,提供一種機制來間接訪問對象的屬性。而不是通過

原创 iOS調用系統日曆

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"calshow:"]];如果要選擇特定的某一天的話(默認是當前日期),calshow:後面加時間戳格式,也

原创 iOS數組排序

原文鏈接:http://blog.csdn.net/bihailantian1988/article/details/8433812 // 1 普通數組排序 NSMutableArray *arr = [NSMutableArra

原创 iOS從相機或相冊獲取圖片並裁剪,再獲取裁剪後的圖片

-(void) selectWayToGetPicture{ UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:nil delegate:self can

原创 iOS簡單的文件操作

-(NSArray*) getFilesByPath:(NSString*)path{ // 根據路徑獲取該路徑下所有文件 NSFileManager *fileManager = [NSFileManager defaultMana

原创 iOS UILabel自適應高度

-(CGSize)sizeWithString:(NSString *)string font:(UIFont *)font { CGRect rect = [string boundingRectWithSize:CGSize

原创 iOS NSDate相關

-(NSArray*) getDayTimeByNum:(NSInteger)num timeInterval:(NSInteger)interval { NSMutableArray *hoursArr = [NSMutable

原创 iOS iOS7以上設置leftBarButtonItem後滑動返回實效

在pushViewController之後加入如下代碼: [self.navigationController pushViewController:viewController animated:YES]; // 開啓iOS7的滑