Hello
UIViewController *viewVC = nil;
NSString *TcodeNib = [selectedObject valueForKey:@"ViewControllerName"];
// Create the next-level view controller
if ([TcodeNib isEqualToString:@"FirstViewController"]) {
viewVC = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
} else if ([TcodeNib isEqualToStri...
Hello
I got a UIViewController implementing UINavigationControllerDelegate and when i try to add UIActionSheetDelegate , it gives exception "NSInvalidArgumentException"
Here is my code:
RootViewController.h
@interface RootViewController : UIViewController <UINavigationControllerDelegate,UIActionSheetDelegate> {
}
-(IBAction) openAct...
I'm not sure how to ask this question, but here goes...
I am rendering a PDF page into a view and adding it to a UIViewController. Works fine, except for some PDF files.
For some reason, the code goes through a different path for certain PDF files. It happens when the PDF is created from PowerPoint. After the addSubview call, it goes ...
(IPhone newbie question)
I've subclassed a UIViewController and a UIView, and created a InitWithFrame for the view. My custom controller uses this to initialize its view, by frame, in its loadView function.
I plan to use the controller and view in my code at different places. At times under a navigation controller, toolbar, both, neit...
I am trying to animate between portrait and landscape orientations by hooking the various autorotation methods in UIViewController. Due to some subtleties of my view hierarchy, I'd like to set the frame of a child UIScrollView in the first half the animation and then scroll into position during the second half. This requires knowledge ...
Here's what I'm trying to do.
I have a single view ("primaryView"), controlled by a customized view controller. primaryView contains a scrollview, which contains an image. Sitting on top of the scroll view (NOT inside it) is a small view ("buttonsView") containing a few buttons.
Basically, when the user rotates the phone, I want butt...
Hi,
I am trying to add some titles to my project. So, when my app gets loaded it should show my title screen with activity indicator spinning and after 3seconds it should push the navigation controller. Basically I will have an image on the first view controller. So, in IB I added an image view and set the image. Please help me guys how...
In my app, I have a UIViewController presented modally with the default slide animation - let's call it 'A'. During the time 'A' is busy popping up it's possible another piece of code will try to use A to present a further modal viewcontroller.
On these occasions, I get an exception, presumably as 'A' isn't fully ready yet.
Does anyone...
What are the consequences of overriding internal UIViewController methods?
[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] is giving me some problems. It resizes my frame to values I do not desire sometimes. I do not even know where it picks off the new frame's values (it is close to the size of the superview to where I ...
I have an app with a tab bar that has a few tabs with user-generated content. When each view controller loads, the viewDidLoad method makes HTTP requests to a server to fetch data, then populates its view correspondingly. Once all the data is loaded, however, the view remains the same (unless the view controller is unloaded and reloaded)...
I have the following ADBannerViewDelegate implementations:
#pragma mark ADBannerViewDelegate Methods
- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
self.headerView.frame = CGRectMake(0, 0, 320, 94);
[self.tableView setTableHeaderView:headerView];
adBannerView.hidden = FALSE;
}
- (void)bannerView:(ADBannerView *)banner...
I have a view controller which manages a view.
I'm adding the my view controller subclass as a subview of the window swapping out another view.
I'm running landscape mode on an iPad.
The view apparently doesn't know that its in landscape mode. Its frame is confused.
Is there something I can/should do to tell it that its in landscape,...
Hi,
I have developed a few applications now all using single view controllers. In each application in the application delegate I alloc/init the first view controller in "didFinishLaunchingWithOptions" and [window addSubview: view_controller.view].
Now my question is what is best practice for removing and adding secondary views.
At the...
Hi All,
I have this:
@interface HomePage : UIViewController<UITableViewDelegate, UITableViewDataSource> {
UITableView *myTable;
NSMutableArray *data;
}
@property (nonatomic, retain) IBOutlet UITableView *myTaböe;
@property (nonatomic, retain) NSMutable *data;
and then I have connected via IB the myTable with datasource and delegat...
Ok, here's the setup:
-I have my main view controller.
-Its one and only subview comes for another view controller that sets its own frame to (0, 0,
1024, 748).
-My app is in landscape mode.
For some reason, the subview of my main view controller is being resized to something like (0, 0, 1280, 400) somewhere between after its initia...
Is there a way to call code when a modal view is finished dismissing?
EDIT:
I'm sorry, I didn't clarify earlier. I'm trying to dismiss a UIImagePickerController and then show a MFMailComposeViewController and attach the image data to the email. When I try to call
[self presentModalViewController: mailController]
right after
[self d...
Let's say I declare an NSMutableArray in the class file foo.h. Then in the viewDidLoad method in foo.m I populate the array. Inside foo.m I can add, delete, or modify array elements.
Then let's say the following code executes inside foo.m
[self.navigationController pushViewController:bar animated:YES];
This will switch the view and p...
Hi,
I have noticed a strange behavior when adding and removing UIViewControllers
I dont post for now any example,I have some view controllers that load their view from a xib and others that i create the view manually.(Do i have to declare Outlets for every element created in IB?even those that are static graphics?or does deallotion happe...
The following code should work, right?
ViewController2 *childView = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil];
[self.navigationController pushViewController:childView animated:YES];
[childView release];
It doesn't do anything though. There are no error messages. The view just doesn't get switched. viewD...
View *view1 = [[View alloc] init];
[self presentModalViewController:view1 animated:YES];
The code above works when connected to a UIButton. It does not work upon launch of an application by putting it in the viewDidLoad method. I want to run this upon launch.
Thanks in advance.
...