Created
March 3, 2013 09:19
-
-
Save taishi41228/5075433 to your computer and use it in GitHub Desktop.
ポップアップメニュー ref: http://qiita.com/items/48f874da6a9530a242fb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IBOutlet NSMenuItem* item1; | |
IBOutlet NSMenuItem* item2; | |
IBOutlet NSMenuItem* item3; | |
IBOutlet NSMenuItem* item4; | |
if ([item1 state]) { // item1を選択済み | |
str3 = [str1 stringByAppendingString:str2]; | |
[textView3 setString:str3]; | |
} else if ([item2 state]) { // item2を選択済み | |
} else if ([item3 state]) { // item3を選択済み | |
str3 = [str1 stringByReplacingOccurrencesOfString:@"入力" withString:@"出力"]; | |
[textView3 setString:str3]; | |
} else { // item4を選択済み | |
str3 = [str1 stringByAppendingFormat:@"に含まれる文字数は%ld文字です。\n", [str1 length]]; | |
str3 = [str3 stringByAppendingString:[str2 stringByAppendingFormat:@"に含まれる文字数は%ld文字です。", [str2 length]]]; | |
[textView3 setString:str3]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment