Time of Update: 2018-12-06
安裝:1、要運行Play!,需要JDK 6 or later 。2、下載playPlay 2.0 binary package;解壓後的路徑加入環境變數中。3、在命令視窗中輸入play help,若看到相應資訊,則安裝成功。 建立項目: 1. play new 你的項目名(test) 2. 跳轉到你的項目目錄下,使用play 3. 選擇你的IDE ,如果用IntelliJ 則輸入idea 4. 當然是run 預設是9000連接埠,不過你也可以在命令列中修改
Time of Update: 2018-12-06
讓Model類遵循NSCoding 和 NSCopying 協議並實現三個方法:- (void)encodeWithCoder:(NSCoder *)encoder {/*[super encodeWithCoder:encoder];//If you are subclassing a class that also conforms to NSCoding, you need to make sure you call encodeWithCoder: on your superclass,
Time of Update: 2018-12-06
ListView 是一個十分常用的控制項。看看它在win8上如何添加:Check:http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx簡單的demo:建立一個空白項目,在default.html中添加:<div id="basicListView" data-win-control="WinJS.UI.ListView"> </div>listView要有相應的list資料和其綁定。
Time of Update: 2018-12-06
項目是在ipad上的橫屏的項目,運行在ios6上時,在用到選擇本地相簿的時候崩潰:“Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning
Time of Update: 2018-12-06
用Automatic Gesture Recognition實現: 在viewDidLoad中- (void)viewDidLoad{ [super viewDidLoad];// Do any additional setup after loading the view, typically from a nib. UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc]
Time of Update: 2018-12-06
querySelector()方法接受一個CSS查詢並返回匹配該模式的第一個子孫元素,如果沒有匹配的元素則返回null。請看下面例子://擷取body元素var body = document.querySelector("body");//擷取ID為myDiv的元素var myDiv = document.querySelector("#myDiv");//擷取第一個包含class值為selected的元素var selected =
Time of Update: 2018-12-06
Check:http://msdn.microsoft.com/zh-cn/library/windows/apps/hh770117.aspx首先先添加一個Page Control ,命名為page。系統產生3個檔案。將其顯示的方法有一下幾種:1、使用 WinJS.UI.Pages.render 功能。在default.html中添加<div
Time of Update: 2018-12-06
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; gestureStartPoint = [touch locationInView:self.view];}- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch
Time of Update: 2018-12-06
剛剛聽完GDOU某老師講使用者體驗及UI方面的知識,他本身也是美工加前端開發的,做了一些筆記記錄:1、眼:注意使用者關注一刻關注的東西只是集中的一點,其他部分會被模糊化。2、記憶:短暫記憶,注意不要老師更改使用者得到的短暫的記憶,就是那些button的位置之類的(AlertView時yes
Time of Update: 2018-12-06
iphone上的手勢操作有許多種,包括輕擊、觸摸、拖動、輕掃等。開發中與四個方法有很大關聯:– touchesBegan:withEvent:– touchesMoved:withEvent:– touchesEnded:withEvent:– touchesCancelled:withEvent:四個方法的參數都是(NSSet *) touches 及(UIEvent *)event。 touches 中的每一個對象都是一個UITouch事件。 NSUInteger
Time of Update: 2018-12-06
用Automatic Gesture Recognition實現十分簡單- (void)viewDidLoad{ [super viewDidLoad]; UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(doPinch:)]; [self.view addGestureRecognizer:pinch];
Time of Update: 2018-12-06
文章目錄 使用標記添加 WinJS 控制項在標記中設定 WinJS 控制項的屬性處理 WinJS 控制項的事件方法二:使用代碼添加 WinJS 控制項 其實在 win8: hello
Time of Update: 2018-12-06
在做一個擷取sina 公用微博的小小demo,在最後重新整理時發現用winjs.xhr調用很快就會返回資料,但是返回的資料都是第一次的資料。這是因為load 的是同樣的url,在訪問web時會有cache,導致無法Reload。check:http://msdn.microsoft.com/en-us/library/windows/apps/hh868281.aspx 通過使用 WinJS.xhr 請求 Web
Time of Update: 2018-12-06
代碼如下:(function () { "use strict"; // Declares strict mode. ...})();匿名函數原因:JavaScript
Time of Update: 2018-12-06
Check:http://msdn.microsoft.com/en-us/library/windows/apps/hh452768.aspx建立一個新項目,選擇Navigation App作為模版。建立之後的目錄: default.html,這是起始頁。它最先被載入。它包含 PageControlNavigator(將每一頁載入到主視窗)的一個執行個體。home.html,這是首頁。它顯示“歡迎”標題。default.js,指定當啟動應用時應用的行為。home.js,指定與首頁相關聯的行為。
Time of Update: 2018-12-06
今天搞了一天,想用hpple較為便利的利用xpath解析html。參考的是這裡面的做法:http://lwxshow.com/ios-iphone-development-teaches-you-how-to-use-the-objective-c-parsing-html-lwxshow-com(相關: http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone
Time of Update: 2018-12-06
如題,關於抽屜式導航,CocoaChina上也有篇總結,有興趣的也可以去瞭解,http://www.cocoachina.com/newbie/tutorial/2012/0720/4475.html第一份demo:在一個ViewController中定義了各種frame不同的UIView,然後在點擊或者手勢滑動的時候現實隱藏相應的view就是了。
Time of Update: 2018-12-06
from: 使用UIImagePickerController從IPhone照片庫或照相機擷取映像使用UIimagePickerController選取照片庫操作十分簡單:在對應響應中:UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; //控制器當然要遵循響應的delegate協議picker.sourceType =
Time of Update: 2018-12-06
建立Popover的幾種方法:1、通過Segue:設定Segue的Style是Popover -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ if([segue isKindOfClass:[UIStoryboardPopoverSegue class]]) { self.pop = ((UIStoryboardPopoverSegue
Time of Update: 2018-12-06
iphone上的資料存放區有四種模式:Property lists 屬性列表 Object archives (or archiving) 對象歸檔 SQLite3 (iOS’s embedded relational database) Core Data (Apple’s provided persistence tool) 儲存中經常需要提取兩個相關的目錄路徑:Documents和tmpGetting the Documents Directory :NSArray