이것은 매우 어리석은 실수이지만,이를 위해 4 일 이상을 보냈습니다.MainWindow.xib에서보기 .xib로드
매우 간단합니다. 저는 MainView.xib와 FirstViewController (h/m/xib)라는 뷰를 가지고 있습니다.
MainWindow.xib에서 UIViewController를 추가하고 클래스 이름을 FirstViewController로 변경하고 Nib 이름도 설정합니다 (양방향으로 시도했습니다).
아울렛과 뭔가 관계가 있다고 생각합니다.하지만 iOS 용으로 개발하는 초보자로서 정말 도움이됩니다. 도움이 필요합니다. SDK와 엑스 코드 3.2 인터페이스 빌더를 사용하여
임 4.3
AppDelegate에
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@interface iPadTerritorioV2AppDelegate : NSObject <UIApplicationDelegate> {
IBOutlet UIWindow *window;
IBOutlet UIViewController *navigationController;
NSString *devToken;
NSString *matricula;
NSString *campus;
NSMutableArray *materiasAlumno; //para CCM
NSMutableArray *busqDir; //para CCM
NSInteger agendaBadgeNumber;
NSInteger intramurosBadgeNumber;
NSInteger notificacionesBadgeNumber;
NSInteger mapaBadgeNumber;
NSMutableData *receivedData;
NSMutableDictionary *listData;
BOOL yaSeHizoElPrimerFetchBadges;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UIViewController *navigationController;
@property (nonatomic, retain) NSString *devToken;
@property (nonatomic, retain) NSString *matricula;
@property (nonatomic, retain) NSString *campus;
@property (nonatomic, retain) NSMutableArray *materiasAlumno;
@property (nonatomic, retain) NSMutableArray *busqDir;
@property NSInteger agendaBadgeNumber;
@property NSInteger intramurosBadgeNumber;
@property NSInteger notificacionesBadgeNumber;
@property NSInteger mapaBadgeNumber;
@property (nonatomic, retain) NSMutableData *receivedData;
@property (nonatomic, retain) NSMutableDictionary *listData;
@property BOOL yaSeHizoElPrimerFetchBadges;
- (void)fetchBadges;
@end
FirstViewController.h
#import <UIKit/UIKit.h>
#import "Constants.h"
#import "StringDecoding.h"
#define kConnectionBadgeNotifications 0
#define kConnectionLogin 1
#define kConnectionDevToken 2
#define kCCMindex 0
#define kCSFindex 1
#define kMTYindex 2
@interface FirstViewController : UIViewController {
IBOutlet UISegmentedControl *segmentedCampus;
IBOutlet UITextField *usernameField;
IBOutlet UITextField *passwordField;
IBOutlet UISwitch *remembermeSwitch;
IBOutlet UIButton *loginButton;
UIActivityIndicatorView *loginIndicator;
NSMutableDictionary *listData;
NSMutableData *receivedData;
NSInteger connectionID;
}
@property (nonatomic, retain) UISegmentedControl *segmentedCampus;
@property (nonatomic, retain) UITextField *usernameField;
@property (nonatomic, retain) UITextField *passwordField;
@property (nonatomic, retain) UIActivityIndicatorView *loginIndicator;
@property (nonatomic, retain) UISwitch *remembermeSwitch;
@property (nonatomic, retain) UIButton *loginButton;
@property (nonatomic, retain) NSMutableDictionary *listData;
@property (nonatomic, retain) NSMutableData *receivedData;
@property NSInteger connectionID;
- (IBAction)handleNextClick:(id) sender;
- (IBAction)backgroundClick;
- (IBAction)login: (id) sender;
@end
보기 "xxxxxxController"을 호출하면 규칙에 따라 나쁘다. **보기입니다. 컨트롤러가 아닙니다! **)) –
Xcode에서 처음부터 뷰 기반 프로젝트를 생성하고 설치 방법을 보았습니까? – Dancreek
@WTP 기본적으로 아이폰 앱을 iPad로 포팅 한 이래 일관성을 위해 나는 소스 파일의 이름을 붙인다. –