在xib和storyboard中對控件使用kvc 選中控件 -> 右邊工具欄的第三個按鈕(有類名的地方) -> User Define Runtime Attributes key path -> 屬性名 Type -> 設置的數據類型 Value -> 值