***テキストフィールドから値取得 [#t92f9294] [[Textfield text] intValue] ***値をテキストフィールドへセット [#c8921fbf] int value; [Textfield setText:[NSString stringWithFormat:@"%d", value]]; ***セグメントコントロール [#b0641135] IBOutlet UISegmentedControl* segval; -(IBAction)chgseg { int index = [segval selectedSegmentIndex]; switch(index){ case 0: segtext.text = @"1"; break; case 1: segtext.text = @"2"; break; case 2: segtext.text = @"3"; break; case 3: segtext.text = @"4"; break; default: break; } ***スライダーの値取得とスライダー設定 [#l9da563e] -(IBAction)chgsliderval { float val = [[slider_val text] floatValue]; [sliderrr setValue:val animated:YES]; } -(IBAction)chgslider { float val; //int val; val = [sliderrr value]; [slider_lbl setText:[NSString stringWithFormat:@"%f", val]]; //[slider_lbl setText:[NSString stringWithFormat:@"%d", val]]; } ***スイッチの状態取得 [#yfc970b0] [switch1 isOn] ---- &size(12){Total:&counter(total); / Today:&counter(today); / Yesterday:&counter(yesterday);};