Time of Update: 2018-07-24
2015年最新百度經驗,iOS真機調試,最新的調試步驟。 工具/原料 mac電腦,iPhone手機 開發人員帳號 方法/步驟 1
Time of Update: 2018-07-24
導航視圖和android 中的viewpager類似 //導覽列相關的是navigationItem,控制器相關的是navigationController 0: 首先還是通過純的代碼來實現 0:刪除3個檔案ViewController.h,ViewController.m,Main.storyboard 1:修改點擊左邊的藍色按鈕,然後選擇general-》developer
Time of Update: 2018-07-24
一、UIPickerView 1. 屬性 1)資料來源對象 @property(nullable,nonatomic,weak)id<UIPickerViewDataSource> dataSource; 2)代理對象 @property(nullable,nonatomic,weak)id<UIPickerViewDelegate> delegate;
Time of Update: 2018-07-24
//UITableViewStylePlain 和 UITableViewStyleGrouped的區別 //首先是header 部分,plain是沒有考慮頂部的,就是wifi訊號那一欄的, //然後plain 有一個頂部滯留的效果的,group是沒有的,這是它兩最大的區別 代碼:iOS 第14課 TableView <一> 建立以及資料來源方法
Time of Update: 2018-07-24
今天遇到了一個很奇怪的問題,整合融雲聊天,,擷取群組未讀訊息數量的時候,我寫了一個通知,再通知中更新tableview Cell中的訊息數量,但是訊息數量改變的很慢,而且有時候不更新 我是更新某一個cell [self.tableView
Time of Update: 2018-07-24
方法 1、通過AppDelegate的 - application: supportedInterfaceOrientationsForWindow: 方法來設定 這個方法是幹什麼的,說明一下這個方法是用來設定介面支援的轉屏方向,不是用來轉屏的,這個方法不能滿足部分需求。 - (UIInterfaceOrientationMask)application:(UIApplication *)application
Time of Update: 2018-07-24
// // ViewController.m // Segment // // Created by JesseWang on 5/23/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #import "ViewController.h"
Time of Update: 2018-07-24
有時候我們需要給文字添加橫線,有兩種情況: 第一種是貫穿中間的橫線: 橫線的顏色和文字的顏色保持一致 _oldPriceLabel.text = @"3500";_oldPriceLabel.textColor = [UIColor lightGrayColor];NSMutableAttributedString *newPrice = [[NSMutableAttributedString alloc]
Time of Update: 2018-07-24
iTunes 改版之後不能通過它來安裝ipa包了。 那麼用什麼呢。 蘋果官方推薦你用testFlight ,但是流程比較麻煩,打包然後上傳還要等蘋果iTunes connect反應過來。。。。 除此之外我們還有什麼方法呢。 前提:所有的安裝方式都是開發人員帳號裡添加了裝置 1、下載同步助手、itools等工具直接選擇應用拖進去即可(適合遠程安裝) 2、利用蘋果的隔空投遞直接把ipa從你mac 拖到iPhone ,然後iphone 自動安裝(適合給測試,小範圍內)
Time of Update: 2018-07-24
最近做測試時發現一個特別奇怪的bug、在每次app退回背景時候、當前app沒有被kill、然後再次切回app時、會閃現一下主畫面 最後鎖定罪魁禍首、在設定返回按鈕不顯示文字的時候、用了如下此方法、造成閃現、將此方法注掉後、此問題解決 //將返回按鈕的文字position設定不在螢幕上顯示 [[UIBarButtonItem appearance]
Time of Update: 2018-07-24
兩個方法: - (CGSize)sizeWithAttributes:(nullable NSDictionary<NSString *, id> *)attrs NS_AVAILABLE(10_0, 7_0); - (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options attributes:(nullable
Time of Update: 2018-07-24
ios函數 二、三次封裝和block作用 ios 中對常使用的模組或者公用模組做二次,三次封裝,對已知api做二次封裝,以更便於自己在項目中使用。 以下為例子: + (NSURLSessionDataTask *)requestDictionary:(void (^)(NSDictionary *, NSError *))block
Time of Update: 2018-07-24
我們app的開發通常有2種認證方式 一種是Basic Auth,一種是OAuth;現在普遍還是使用OAuth的多,而使用Basic Auth認證的少,正好呢我今天給大家介紹的就是使用的比較少的Badic Auth認證方式,這種認證方式開發和調試簡單, 沒有複雜的頁面跳轉邏輯和互動過程,更利於發起方控制。然而缺點就是安全性更低,不過也沒事,我們可以使用https安全加密協議,這樣才更安全。 &
Time of Update: 2018-07-24
/**正則匹配關鍵字高亮 keyword就是需要高亮的關鍵字 options:NSRegularExpressionCaseInsensitive 不區分大小寫 */ NSMutableAttributedString* newString = [[NSMutableAttributedString alloc] initWithString:model.totalstring]; NSRegularExpression *regex =
Time of Update: 2018-07-24
我在網上下載了一個Demo,在iPhone4和iPhone4S上顯示一切正常。但是使用iPhone5等的時候出現了顯示不全的問題當我使用iPhone5和iPhone5s真機測試時,在應用畫面的上下各有一條黑色,截圖如下: 檢查問題步驟: 一、我開始仔細檢查代碼,發現在整個工程中,沒有一個地方在設定畫面高度時候使用了固定值480,都是直接擷取螢幕大小,然後再設定畫面大小的。
Time of Update: 2018-07-24
前言 一個Universal程式還是iPhone、iPad倆個版本 。 通用的: 優點: 一個安裝包,方便管理、分發 可共用一套邏輯代碼,資料結構 缺點:
Time of Update: 2018-07-24
在做ibeacon 模組時,首先要判斷藍芽是否開著。那麼問題來了,怎麼樣用代碼判斷藍芽開著呢。 查了API,發現CBCentralManager可以實現。 首先要完成協議 CBCentralManagerDelegate @property CBCentralManager *centralManager; self.centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil options:
Time of Update: 2018-07-24
需求:刪除 qq 登入的 cookie,保證下次開啟 qq 登入頁面不會預設登入 實現: NSString *url =@"https://w.mail.qq.com/cgi-bin/loginpage?f=xhtml&kvclick=loginpage|app_push|enter|ios&ad=false&f=xhtml";//qq登入的 url
Time of Update: 2018-07-24
原貼地址:http://blog.csdn.net/jinglijun/article/details/9048959 清除所有的cookie 方法: [html] view plain copy
Time of Update: 2018-07-24
一、刪除所有cookie三句話搞定: NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (cookie in [storage cookies]) { [storage deleteCookie:cookie]; } //緩衝web清除 [[NSURLCache