macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

UITextFieldクラス

INDEX>UIKit>

テキストフィールドのクラスです。


継承 UIControl : UIView : UIResponder : NSObject
準拠 NSCoding
UITextInput
NSCoding (UIView)
UIAppearance (UIView)
UIAppearanceContainer (UIView)
NSObject (NSObject)
フレームワーク /System/Library/Frameworks/UIKit.framework
使用可能 iOS 2.0
定義 UITextField.h

概要

テキストの入力を受け付けます。

参照

タスク

テキスト属性へのアクセス

text
  2.0- テキストフィールドのテキスト
attributedText
  6.0- 属性付き文字列
placeholder
  2.0- プレースホルダ文字列
font property
textColor property
textAlignment property

テキストフィールドのテキストのサイズ

adjustsFontSizeToFitWidth property
minimumFontSize property

編集時の挙動の管理

editing property
clearsOnBeginEditing property

背景の見え方の設定

borderStyle property
background property
disabledBackground property

オーバーレイの管理

clearButtonMode property
leftView property
leftViewMode property
rightView property
rightViewMode property

デリゲートへのアクセス

delegate property