巻頭ページを5秒後にデフォルトです。pngファイル以前のMainWindow.ペン先
-
23-09-2019 - |
質問
私が作成したプロジェクトの default.png
眠3秒後 MainWindow.xib
読み込みたいと思った新しい IntroPageViewController.xib
前 FirstPageViewController.xib
ます。たいと思ったあのテキストIntroPageる負荷は10秒間はスキップボタンを押します。私は既に作成されているの FirstPageViewController.xib
今、思い荷重 IntroPageViewController.xib
に applicationdidfinishlaunching
.
思いが現実のものになっているとの FirstPageAppDelegate.h
ます。mるものの、 FirstPageViewController.xib
負荷までの変更 info.plist
への負荷 IntroPageViewController.xib
または IntroPageViewController
の申請がクラッシュします。ると英語が得意な人が助けてください。
メントを事前に:)
について メリカ-サンフランシスコ
解決
の代わりに負荷をIntroPageViewController.xibのFirstPageViewController.xibを手動で、ここ
- がFirstPage負荷データを重ねて表示する IntroPage観です。
- 遅れた場合をスキップボタンを を押すと、削除のIntroPage.
これらの課題に取り組み、その過程
ることIntroPageViewController対応するxibファイルです。
Xcodeにて、セットアップボタンやアクション方法をボタンを押します。
// in your .h file.
@interface IntroViewController : UIViewController {
UIButton *skipButton;
}
@property (nonatomic, retain) IBOutlet UIButton *skipButton;
-(IBAction)skipPressed;
@end
// in the .m file
-(IBAction)skipPressed {
[self.view removeFromSuperview]; // this removes intro screen from the screen, leaving you FirstView
}
// put this in the viewDidLoad method
- (void)viewDidLoad {
[super viewDidLoad];
[self performSelector:@selector(skipPressed) withObject:nil afterDelay:5];
}
// add these in FirstViewController.m
#import "IntroViewController.h"
- (void)viewDidLoad {
[super viewDidLoad];
IntroViewController *introViewController = [[IntroViewController alloc] initWithNibName:@"IntroViewController" bundle:[NSBundle mainBundle]];
[self.view addSubview:introViewController.view];
[introViewController release]; // this removes your IntroScreen from memory once it disappears offscreen
}
今は次のステップがオープンIntroViewController.xibのインターフェイスをビルダーをドラッグUIButtonは、そのタイトルをスキップ'.
接続ボタンを skipPressed 行動を接続し、ファイルのオーナーのボタンを押します。
戻築 を構築し、運用開始する。 るとしていたことが分かりました。すべてはおIntroViewるべきで可視なものを始時間5秒までをタッチしたままスキップボタンを押します。
他のヒント
いくつかのタイマーを作成するためにnstimerを使用しています。対応するアクションは、10秒後に実行されるか、またはボタンをスキップする際に押下される。