[問題] IB拉了connection後進不了程式主畫面
大家好 小弟是撰寫ObjC程式的新手
日前按照網路上的範例做程式
我稍微解釋一下
這程式是用window.xib檔
然後用IB放元件
也用IB中的 黃色正立方體"NSObject"(controller)來
建立/產生outlet與action中的變數(包含outlet與action的宣告程式碼)
**這時候build and run是會進入程式主畫面
((現在要依slider的值改變 label中的text,
所以我開啟controller inspector 把outlet, action都拉線與window中的元件連線
**connection完了之後, build and run 就進不去主畫面了
**點程式icon就彈回程式選單((iphone一開機那邊,就一堆icon那邊
**怎麼點怎麼進不去, delete掉那些connections之後又可以進去了...
請問有人遇過這種問題嗎?
可不可以教我該怎麼解決! 謝謝你
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.64.84.178
※ 編輯: tcuplayer 來自: 203.64.84.178 (07/22 10:52)
※ 編輯: tcuplayer 來自: 203.64.84.178 (07/22 10:52)
→
07/22 13:10, , 1F
07/22 13:10, 1F
--
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface Controller :NSObject{
IBOutlet UILabel *labelB;
IBOutlet UISlider *sliderB;
}
- (IBAction)sliderChangedB:(id)sender;
@end
--
#import "Controller.h"
@implementation Controller
- (IBAction)sliderChangedB:(id)sender {
labelB.text = [NSString stringWithFormat:@"%0.f", sliderB.value];
}
@end
不好意思發文時不夠明白,上面是controller.h與.m
謝謝~
※ 編輯: tcuplayer 來自: 203.64.84.176 (07/22 13:57)
推
07/22 22:03, , 2F
07/22 22:03, 2F
→
07/22 22:03, , 3F
07/22 22:03, 3F
→
07/22 22:19, , 4F
07/22 22:19, 4F
→
07/23 14:09, , 5F
07/23 14:09, 5F
→
07/23 14:09, , 6F
07/23 14:09, 6F
→
07/23 14:12, , 7F
07/23 14:12, 7F
→
07/23 14:13, , 8F
07/23 14:13, 8F
推
07/23 16:54, , 9F
07/23 16:54, 9F
→
07/23 19:28, , 10F
07/23 19:28, 10F