2014年11月24日 星期一

Apple Watch Human Interface Guidelines 隨手記


Apple Watch Human Interface Guidelines


Interface Style:

  • Hierarchical. This style matches the navigation style in iOS and is best suited for apps with hierarchical information. In a hierarchical app, users navigate by making one choice per screen until they reach their destination. To navigate to another destination, users must retrace some or all of their steps and make different choices.
    A hierarchical model is typically better than a flat, paginated navigation model for more complex app interactions.
  • Page-based. A paginated interface lets the user navigate between pages of content by swiping horizontally. A page-based interface is best suited for apps with simple data models where the data on each page is not directly tied to the data on the other pages.
    A dot indicator at the bottom of each page shows the user’s place in the set. Keep the total number of pages as small as possible to simplify navigation.

註:二擇一,避免混用


Glances are:
  • Template-based. There are separate templates for the upper and lower portions of the Glance screen. Use Xcode to pick the templates you want and then design your content to those specifications.
  • Not scrollable. All content must fit on a single screen.
  • Read-only. Tapping anywhere on the glance opens the app.
  • Optional. Not all apps need a Glance, and users can select which Glances to display.

註: Glances 非必要,可套版,不可滾動



Notification:

Be sensitive to the frequency with which you send notifications to users. Users might perceive a frequent notifications as annoying and disable notifications for your app on Apple Watch. Always make sure notifications are relevant to what the user wants.


註:有分 short look & long look,版面制式化,小心使用


Layout:


兩種SIZE





Color and Typography
Use black for your app’s background color. A black background blends seamlessly with the device bezel and maintains the illusion of there being no screen edges. Avoid bright background colors in your interface.
Use your app’s key color for branding or status. Every app defines a key color. The system uses this key color for the title string in the upper-left corner of the screen and in notification interfaces to highlight your app name or other key information. You should similarly use the key color as part of the branding of your app.
Use high contrast colors for text. High contrast colors make text more legible.

Use the built-in text styles whenever possible. The built-in styles automatically support Dynamic Type and were designed to look good on Apple Watch.

Prefer the use of a single font throughout your app. Apps can use an additional font for branding purposes, but use that extra font sparingly. Mixing many different fonts can make your app seem fragmented and sloppy. Use the UIFont text styles API to define different areas of text according to semantic usage, such as body or headline.


註:顏色採用高對比,建議使用黑色背景,字型盡量單一且使用內建字型。


Table:


Use row types consistently. You might create different row types to implement your content, headers, and footers. Be consistent in your use of those rows.

Avoid mixing rows with dramatically different types of content. When displaying content, be consistent with the row type you use to display that content. Use other row types only as section breaks or to organize the content rows. Using the same row type for content ensures that rows are sized consistently and are easier to navigate.

Limit the number of table rows displayed at one time. Tables with more than twenty rows of content become cumbersome to scroll through. Display only the subset of rows that are immediately relevant and give the user the option to load more rows.


註:單一cell,避免太多列,超迥10列給user "讀取更多" 的 button.

Button:



Create buttons that span the width of the screen. The creation of full-width buttons is strongly encouraged. If you must put more than one button in the same horizontal space, limit the total number of buttons to two.
Try to match button heights whenever possible. If you have multiple buttons onscreen together, use the same height for each. Buttons


註:寬盡量滿版,最多塞二個button

Image:
Create all image assets as @2x resources. There is no need to create non Retina images.


Dates and Timers:

Use a date object whenever you want to display the current day or time.
Always use a timer label to implement a precise countdown or count-up timer.

註:使用內建的 Dates Label 和 Timer Label


ICON:



























2014年10月19日 星期日

iOS : Audio Trimming

最近在研究 iOS 音樂剪輯/播放這一塊,紀錄一下

Trim :

http://stackoverflow.com/questions/13097331/unable-to-trim-a-video-using-avassetexportsession

http://stackoverflow.com/questions/9698787/ios-audio-trimming

http://stackoverflow.com/questions/21463250/cocoa-avasset-loaded-from-file-has-0-tracks

Export Mediaitem to local file:

http://stackoverflow.com/questions/13925148/exporting-video-from-users-itunes-library

http://stackoverflow.com/questions/4238219/trim-audio-with-ios


2014年9月25日 星期四

xcode plugins


分享咱家技術長推的兩個好用的 XCode Plugins


1. FuzzyAutocompletePlugin

https://github.com/FuzzyAutocomplete/FuzzyAutocompletePlugin/releases

這是一個非常懶惰的Plugins, 原本在寫程式時要依序打 NSStringFromCGRect, Xcdoe 才會跳出選擇讓你選,裝了 Fuzzy 後你可以跳著輸入 NSS RE 就會讓你選擇 NSStringFromCGRect 了。

2. BBUncrustifyPlugin

https://github.com/benoitsan/BBUncrustifyPlugin-Xcode

這個可以簡單的幫你把大家寫的 Code 的格式全部轉成一様,在多人工作的環境下,看起來會像是同一個人寫的。

2014年9月23日 星期二

Linux 找出誰佔據了你硬碟容量&清理mysql 記錄檔

搜尋資料夾檔案大小 du --exclude="proc" | sort -g -r | head



登入mysql


mysql -u root -p


清理 mysql-bin 方法為:

PURGE MASTER LOGS TO 'mysql-bin.010';
PURGE MASTER LOGS BEFORE '2008-12-19 21:00:00';

============================
位於 /var/spool/mail/root 信箱如果滿了,要如何一次清空呢
方法很簡單,只要下達一行指令即可

cp /dev/null  /var/spool/mail/root


2014年9月2日 星期二

App 不在背景執行也可以接收 iBeacon

有點強~

https://community.estimote.com/hc/en-us/articles/203253193-Launching-notifications-in-iOS-when-the-app-is-killed

2014年7月27日 星期日

破解 Sublime text 3 build 3059

http://www.yutent.com/?article=73

這篇是我找到最簡單的,也成功破解了, try it

2014年7月14日 星期一

UISearchDisplayController 在 鍵盤消失後 Tableview 的位置跑掉了

由於客戶要求使用 UISearchDisplayController

就弄了一下,沒想到 Display 的 table 怎様都不對,DeBug 了一個下午才解掉

有人說這是 iOS7 的 Bug,我也不知道,但的確很微妙

解答在 這裡

直接複製貼上就是完美解,

希望不要有人再浪費時間在這個問題上面。