created a xib
There are two xib one is mainwindow.xib one next.lib
[Mainwindow next: oneViewController animated: YES];
Write?
Reply:
Designed to make the bottom of the wind brother?
Reply:
What xxxx.xib view called?
How to initialize this view
Reply:
Ah, beginner, the pressure is not small
Reply:
Just learn?
Well, you better put aside IB ⋯ ⋯
I have a reason to let you use the N code rather than using IB to build your project.
Reply:
That's CONTROLLER VIEW to define an object loaded on the OK
Reply:
I created a new class and xib
Want to click a button from another view, open the xib view
I do not know my description is not clear
Reply:
Specific code?
nextView * nextv = [[nextView alloc] init];
[Self.navigationController pushViewController: nextv animated: YES];
Tip request for member 'navigationController' in something not a structure or union
What is the reason?
Reply:
In ObjC in, UIview with UIViewController is different
You can write two UIView in a UIViewController, and then click the button to switch back and forth.
If you do not understand, I made an example out

Reply:
Find examples
Reply:
Often recommended after the
http://stackoverflow.com/
Instead csdn
Here is the place to chat
Reply:
General UIViewController xib file is created or uiview?
Reply:
UIViewController
Reply:
Examples?
I still do not clear how to jump to another view
Reply:
Leave me a message, specifying the mailbox
Reply:
# Import "SwitchViewCtl.h"
@ Implementation SwitchViewCtl
- (Id) init {
if (self = [super init]) {
v1 = [[UIView alloc] initWithFrame: CGRectMake (0, 0, 400, 400)];
v2 = [[UIView alloc] initWithFrame: CGRectMake (0, 500, 400, 600)];
/ / Initialize two View
[V1 setBackgroundColor: [UIColor cyanColor]];
UIButton * bt = [[UIButton alloc] initWithFrame: CGRectMake (100, 250, 100, 50)];
[Bt setImage: [UIImage imageNamed: @ "114.png"] forState: UIControlStateNormal];
bt.titleLabel.text = @ "show";
[Bt addTarget: self action: @ selector (openView) forControlEvents: UIControlEventTouchDown];
[V1 addSubview: bt];
[Self.view addSubview: v1] ;/ / load a
}
return self;
}
- (Void) openView {
v1.hidden = YES ;/ / may be hiding, you can also set the Frame overwritten, of course, you can also delete [v1 removeFromSuperview] from the main ViewCtl in;
[V2 setBackgroundColor: [UIColor blueColor]];
[Self.view addSubview: v2] ;/ / load another
[Self.view setNeedsDisplay] ;/ / Here is refreshed it
}
- (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions {
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
SwitchViewCtl * switchViewCtl = [[SwitchViewCtl alloc] init];
[Window addSubview: switchViewCtl.view];
[Self.window makeKeyAndVisible];
return YES;
}
int main (int argc, char * argv []) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain (argc, argv, nil, @ "ViewSwitchAppDelegate");
[Pool release];
return retVal;
}
This can say clearly? The project file is sent to you better
Reply:
Concerned about this issue
No comments:
Post a Comment