iphone:藍芽傳輸

使用的是GameKit的架構遵循協議:<GKPeerPickerControllerDelegate,GKSessionDelegate>@property (strong, nonatomic) GKSession *currentSession;@property (strong, nonatomic) GKPeerPickerController *picker;串連時 picker =[[GKPeerPickerController alloc] init];

iphone:圖形

apple中文文檔 http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/GraphicsandDrawing/GraphicsandDrawing.html"避免在滾動過程中清除原先的內容預設情況下,在調用drawRect:方法對視圖的某個地區進行更新之前,UIKit會清除該地區對應的上下文緩衝區。如果您對視圖的滾動事件進行響應,則在滾動

iphone:自訂UIAlertView

由於項目中有這樣一個需求:需要在儲存是彈出框選擇儲存的地點。選擇UIAlertView來實現,但是要在UIAlertView中增加UISwitch的控制項,這就需要自訂一個繼承UIAlertView的類來自訂UIAlertView了。實現效果如下:(還沒加圖的)我需要在點擊確定的時候,知道兩個Switch的狀態,才能進一步做相應的功能。自訂了SaveAlertView類。在.h中,需要自訂一個@protocol,作為把switch狀態傳出去的出口。聲明相應的委託。看源碼#import

iphone:URL initWithString 返回為空白

Parameters URLStringThe string with which to initialize the NSURL object. This string must conform to URL format as described in RFC 2396. This method parses URLString according to RFCs 1738 and 1808.  DiscussionThis method expects URLString to

iphone開發中的資料存放區:Property lists

定義兩個方法:- (NSString *)dataFilePath;擷取返回資料檔案的完整路徑名- (void)applicationWillResignActive:(NSNotification *)notification;儲存資料,參數notification的作用是在對象之間傳遞通知,保持通訊。#define kFilename @"data.plist"- (NSString *)dataFilePath { NSArray *paths =

iphone:Grand Central Dispatch

queue有三種 Main: tasks execute serially on your application’s main threadConcurrent: tasks start executing in FIFO order, but can run concurrently.Serial: tasks execute one at a time in FIFO order(1)serial queues(串列隊列)又稱私人調度隊列(private),一般用再對特定資源的同步訪問上。

iphone:實現像DrawSomething類似的自動畫圖的動畫效果

設定layer的path為NSBezierPath對象,再對layer添加animation,注意[CABasicAnimation animationWithKeyPath:@"strokeEnd"] 中的keyPath不能隨意更改。CAShapeLayer *l = [CAShapeLayer layer];l.frame = self.view.bounds;l.strokeColor = [UIColor redColor].CGColor;CGPoint start =

iphone: 可編輯的tableView Move&Delete

設定一個Button,點擊可以刪除,移動排序tableView,如下:左邊為移動,右邊為刪除                                     先說移動:button要設定IBAction- (IBAction)toggleMove { [self.tableView setEditing:!self.tableView.editing animated:YES]; if (self.tableView.editing)

iphone應用程式結構

• Classes -> 來源程式檔案(.h、.m)• Other Sources-> main.m 等,不需要程式員修改  -Prefix.pch• Resources -> 介面檔案(.xib)、設定檔-info.plist• Frameworks -> 連結的庫• Targets -> 項目的不同Target(資源、編譯配置不同)• Executables ->

WindJS 中的$await

因為在看win8時看到Promises的非同步模式。kinfey讓我們去摸下WindJS(就是之前的Jscex),WindJS的具體操作會在之後總結,可先看看文檔http://windjs.org/cn/docs/。看WinJS時接觸到$await,從其作者--老趙的部落格中可找到其描述。Check:淺談Jscex的$await語義及非同步任務模型簡單小結:$await的語義:如果該任務沒有運行,則啟動該任務。如果該任務已經完成,則立即返回結果(或拋出異常)。例子:假如有三個任務:A和B可以並行

“NSInternalInconsistencyException’, reason: ‘This NSPersistentStoreCoordinator has

在做要用到Core Data 相關的項目,突然出現錯誤"NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores.  It cannot perform a save

iphone:數組的反序

有時要要使數組順序顛倒,如果只是輸出,則可以用 [array reverseObjectEnumerator]實現NSArray * array = [NSArray arrayWithObjects:@"wang", @"zhou", @"xiaozhou", nil]; //正序輸出 for (NSString * str in array) { NSLog(@"%@", str); } //反序輸出 for (NSString * str in [array

property 中的strong 與weak

strong關鍵字與retain關似,用了它,引用計數自動+1,用執行個體更能說明一切 @property (nonatomic, strong) NSString *string1;   @property (nonatomic, strong) NSString *string2;   有這樣兩個屬性,  @synthesize string1;   @synthesize string2;    猜一下下面代碼將輸出什麼結果? self.string1 = @"String 1";

Win8:WinJS.UI.AppBar 工具列

建立工具列不是十分簡單,直接用winjs的控制項appbar就行。直接看官方代碼:在HTML中: <div id="createAppBar" data-win-control="WinJS.UI.AppBar" data-win-options=""> <button data-win-control="WinJS.UI.AppBarCommand" data-win-options="{id:'cmdAdd',label:'Add',icon:'add'

控制項-TextField、Slider、

 建一個Single View Application的project。部分代碼:#import <UIKit/UIKit.h>@interface BIDViewController : UIViewController@property (strong, nonatomic) IBOutlet UITextField *nameField;@property (strong, nonatomic) IBOutlet UITextField *numberField;-

win8: html5+css3+js

     將要開始的學習是win8上的metro app 的開發。體驗win8過後可以感受到微軟的誠意,win8 is so cool ! 而Mertro app 個人覺得更是把win8 看出是與android  iphone 類似的用戶端來開發。並且還有一點很重要的,metro app 允許用web的技術去開發,這幾天出的firefox os 也雷同,或許這會是下個大趨勢,呵呵,拭目以待咯!     

win8: WinJS的物件導向 WinJS.Class

官方文檔:http://msdn.microsoft.com/en-us/library/windows/apps/br229776.aspxWinJS.Class.define 類定義var object = WinJS.Class.define(constructor, instanceMembers, staticMembers);三個參數是:建構函式,執行個體成員集合,靜態成員集合。e.g.var Robot = WinJS.Class.define( function(name) {

win8: hello gril

My first metro app in win8:hello grilfrom 官方文檔:http://msdn.microsoft.com/en-us/library/windows/apps/hh986964.aspx看效果:建一個blank App;先看project 組成:References:庫的引用css:裡面一個default.css 放置樣式內容images:圖片檔案夾js:檔案夾,裡面一個default.js  js檔案default.html Hello

Win8:To Do List Demo

無聊做了一個todoList的應用來練練手。先po張介面圖:從介面可以看到基本的控制項,主要是一個輸入框,一個添加按鈕,一個刪除按鈕,加一個listView。關於listview的添加可以參照我之前寫的win8: ListView 。Add:每次在輸入之後點擊Add button,會把輸入框內容push進一個dataArray中,再以此設為listview的資料來源, var dataList = new WinJS.Binding.List(dataArray);

win8:metro app UI 設計

核心:內容重於形式。1、解析度:最小1024*768  建議:1366*768。2、橫向流動,可縱向,但縱向不應超出橫向。3、建議大背景,注意留白。4、邊緣對齊(但避免居住對齊)。5、文字:     tittle:42pt   subtitles:20pt    content:11pt      注釋:9pt6、硬規定:左上因留一個120*100的地區。即title 的基準距上邊框最小為100像素,內容距左邊最小為120像素。這樣的好處最大是為了不同螢幕的適配問題。           

總頁數: 61357 1 .... 8206 8207 8208 8209 8210 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.