原创 代碼塊block

格式  返回值類型(^代碼塊名)(參數列表) = ^(參數列表) { }     void(^block1)()=^(){         NSLog(@"這是一個代碼塊");     };          block1(

原创 Windos 10 UWP 設置手機狀態欄

             if (DeviceHelper.IsMobile)             {                 StatusBar status = StatusBar.GetForCurrentView(

原创 UIScrollView的循環滾動+UIPageControll

// //  ViewController.m //  UIScrollView循環播放效果 // //  Created by on 16/7/27. //  Copyright © 2016年 xiaopeng. All

原创 UITabBarController和UINavigationController搭配使用

    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];               ViewController *vc = [[Vi

原创 iOS中時間與字符串互轉

先上代碼 //轉換時間 NSString *timeString = @"Fri Jul 29 07:56:44 +0800 2016"; NSDateFormatter *formate = [[NSDateFormat

原创 觸摸和手勢

// //  ViewController.m //  UITouchTEST // //  Created by  on 16/7/21. //  Copyright © 2016年. All rights reserved

原创 定位和地理編碼

-------------------------------------------------------- CLLocationManager 定位管理者 CLLocation 代表位置(經度/緯度/高度/速度/路線等) C

原创 獲取跟控制器rootViewController

UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;

原创 UITableView的編輯模式

#pragma mark -- 設置Cell移動模式 -(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPat

原创 地圖與定位

//-------------------------------------------// #pragma mark - 定位實現 // 導入頭文件 #import <CoreLocation/CoreLocation.h>

原创 iOS程序運行沙盒的路徑詳解

// // main.m // iOS程序運行沙盒的路徑 // /* 1)沙盒的基本概念和作用 每個ios應用都有自己的應用沙盒,應用沙盒就是文件系統目錄,與其他應用的文件系統隔 離,ios系統不允許訪問其他應用的應用沙盒。

原创 collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath 方法不調用

程序運行死活沒效果,後來斷點發現 -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NS

原创 UITableViewCell重用機制

//常用重用方式     CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; //    註冊原型Cell後下面方法將不會

原创 UIImage圖片模式

typedef NS_ENUM(NSInteger, UIViewContentMode) {     UIViewContentModeScaleToFill, //根據視圖比例拉伸圖片     UIViewContentModeSca

原创 安卓逆向教程

https://bbs.ichunqiu.com/thread-33924-1-1.html