原创 【CC2530入門】CH340驅動安裝失敗解決建議
1.ch340安裝失敗. 如果是win7,win8系統可以嘗試安裝官方最新的驅動CH341.(支持WINDOWS 98/ME/2000/XP/Server 2003/VISTA/Server 2008/Win7/Win8/Win8.1 3
原创 IOS中NSPredicate的用法
NSPredicate是一個Foundation類,它指定數據被獲取或者過濾的方式。它的查詢語言就像SQL的WHERE和正則表達式的交叉一樣,提供了具有表現力的,自然語言界面來定義一個集合被搜尋的邏輯條件。 相比較抽象的談論它
原创 【leetcode】 two sum
Two Sum: Given an array of integers, find two numbers such that they add up to a specific target number. The functio
原创 initWithCoder, initWithNibName, viewDidLoad的區別
在學習iOS教程時,總會遇到初始化的問題,由於分不清initWithCoder, initWithNibName, viewDidLoad等方法的區別,導致學習一頭霧水。 在查閱資料之後,打算總結一下自己整理的資料。 定義: 1. i
原创 What is the difference between initWithCoder:, initWithNibName:, and awakeFromNib?
Answer Wiki initWithNibName:bundle: is a message sent to a view (or window) controller in order to create
原创 時間與日期詳解
時間日曆類 導語 NSDate、 NSCalendar、 NSDateComponents和 NSTimeZone類,提供了日期和時間的編程和格式支持。 NSDate: 表示一個絕對的時間戳 NSTimeZone: 時區信
原创 純代碼創建UI界面入門(二)
上文中是在沒有storyboard下創建UI,但是那樣的方法既繁瑣,又不符合MVC設計模式。 所以本文通過IB初始化界面,然後通過代碼動態添加UILabel和刪除UILabel #import "ViewController.h" @
原创 Quartz 2D學習(一)簡單繪製圖形
Quartz 2D學習(一)簡單繪製圖形 導語 Quartz 2D是一個二維圖形繪製引擎,它支持iOS環境和Mac OS X環境,爲開發者提供了很多方便,它在繪圖上的功能十分強大,如基於路徑的繪圖、透明度、陰影、顏色管理、反鋸齒
原创 【leetcode】 Implement strStr()
問題: Implement strStr() Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part
原创 NSURLSession和NSURLConnection比較
背景介紹: 作爲Core Foundation / CFNetwork 框架的APIs之上的一個抽象,NSURLConnection伴隨着2003年Safari瀏覽器的原始發行版本,誕生於10年前。NSURLConnection這個名字,
原创 純代碼創建UI界面入門(一)
一、刪除main.storyboard,並在info.plist中刪除main storyboard file base name 二、在-(BOOL)application:didFinishLauchingWithOptions:中
原创 iOS 屬性中strong,weak,assign,retain,copy等特性
導語: 在初學iOS的時候,不明白property中屬性有什麼作用,比如strong, weak, assign, retain, copy等特性。 一、 Objective-C程序員的基本內存管理模型有三種 自動垃圾收集(現在Apple
原创 基於Objective-C的面向對象編程入門
本文中介紹到得概念有: 對象(Object)的概念繼承(inheritance)MVC(Model-View-Controller是一種軟件設計典範)(之後的OC都指代Objective-C) 一、 對象的概念 對象指的是人們要進行研究
原创 cocos:command not found 解決方法
問題:在mac上運行終端,然後cd至 /Users/chen/Documents/cocos2d/cocos2d-x-3.7.1/tools/coc
原创 Waring:Title set but using a system identifier解決辦法
Waring:Title set but using a system identifier解決辦法 在寫項目時出現MainStoryboard.storyboard:Title set but using a system identi