Hi,
I have a view controller that is inside a popover, and I want to present a modal view controller from it. Here's my code:
EditDateViewController *dateViewController = [[EditDateViewController alloc] initWithNibName:@"EditDateViewController" bundle:[NSBundle mainBundle]];
UINavigationController *navController = [[UINavigationCon...
Hello,
I am trying to solve a problem considering update of an view.
First I switch to another view by using:
- (void)viewSettings {
settingsViewController = [[SettingsViewController alloc] initWithNibName:nil bundle:nil];
[[self viewController] presentModalViewController:settingsViewController animated:YES];}
Which is a delegate Me...
Is there a way to enable rotation but without the animation as you turn the device from portrait to landscape?
I'm looking at:
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
... but I don't see how I can set the "duration" property to 0 and thus elimi...
Hi all,
I'm trying to switch from two-stage rotation to one-stage rotation (to avoid the console warning, and because Apple recommend doing so because one-stage is faster).
However I can't figure out how to get the new size of my view (taking into account the navigation bar, status bar, etc) early enough to perform the update of my UI ...
.hidesBottomBarWhenPushed = NO; doesn't work because the view isn't getting pushed. I want the tabBar to be hidden on the first screen and able to show it again a few screens later.
How can I do this?
...
In order to speed up my app, I've create three different UIViewController in AppDelegate and it has readonly property for the controllers. Those controllers are used for navigation controller.
If I tap a button on the root view, I just show another view using pushViewController method. Let me show you some code for this here.
UIViewCon...
Hi there.
I can't seem to push a UITableViewController onto a UIViewController using the following code:
[self.navigationController pushViewController:cardsViewController animated:YES];
The following code works for modally presenting the same view:
[self presentModalViewController:cardsViewController animated:YES];
Does anyone kno...
Essentially i want to display a notification just beneath the UINavigationController, covering the area that would be occupied by the top most UIViewController's view. However i want the background image to extend upwards and partly cover the UINavigationBar
The finished product should hopefully look like the below
The trick comes in ...
Hi all
I am not clear about the need to create an app delegate class, instead of adding the delegate methods in the viewcontroller directly.
Is there any reason why someone want to have a separate delegate class? Style preference? Design constrains? (I am following the MVC model, as Xcode users and app makers do).
I am asking since i ...
I have a UITableViewController with a method called "sectionOpen". In this controller I have a UITableView with custom headers, which are in fact a UIViewController. I have attached a UITapGestureRecognizer to it, it works if I call a selector on the header's View Controller.
The thing is I need to call a selector on the UITableViewCont...
Hello,
I'm developing an app using a fork of LeavesViewController that changes to a two-page orientation when the device turns to landscape.
When using the Leaves controller alone, everything works fine.
When using the Leaves controller inside the view of my main UIViewController, it never gets any of the device rotation messages (how...
I have a subclass of UITabBarController which i am using so that i can rotate to use my app in landscape too.
How would i go about rotating my UI and getting each view controller to use a landscape view xib?
I have always just written apps before where returning YES for shouldAutorotate... handles it automatically for me... this isn't ...
Dear scholars, code gurus.
My question is rather simple, I have been searching and trying for some time now without any luck, I would greatly appreciate some tiny help.
I have a simple class that should generate a view as following:
// vipcardclass.h
//
#import <UIKit/UIKit.h>
@interface vipcardclass : UIViewController {
}
+(IBA...
In xCode, writing an iPhone app, should I NOT put code after/while flipping a view?
I seem to get random crashes....
{
FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
controller.delegate = self;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHor...
I don't think this should be in my view, but instead handled by the controller. I suppose this could be done in the SQL (can get ugly real quick) or in the controller (I think this might be best), or maybe even an HTML helper. But, I'm not sure how to unpack/repack my IQueryable/IEnumberable in the controller. I think that giving the tem...
The code below generates a button and places it on the screen;
button = [UIButton allow] initWithFrame:CGRectMake(0.0, 0.0, 20.0, 20.0)];
button.frame = CGRectMake(0.0, 20.0, 10.0, 40.0);
button.backgroundColor = [UIColor redColor];
[self.window addSubview:button];
However, when I generate a new screen via "pushViewController:animated"...
What function is definitely to be called in UIViewController whenever the view is shown in iPhone application development, including after hitting the "last view" button in a NavigationViewController?
I am getting some unsynchronized information with views using NavigationViewController. I am wondering if I can place a function call to ...
I have a simple app with two basic screens, a UIMapView and a UITableView. I'd like to have a toolbar at the bottom with a couple of buttons and a UISegmentedControl with two segments: "Map" and "Table". (The layout is similar to the Google Maps app that ships with the iPhone.) How can I keep the same toolbar while presenting either the ...
I am a newbie in iphone dev, and I am confused by UIViewController.
most program start with a view controller, but I don't know why we need it.
ViewController has a view, but you cannot use the drawRect medthod.
So why not just use View instead of ViewController in places like UIWindow and so on?
I learned that to initialize a View, yo...
Hello,
I have been loading view from Nib files successfully using the approach found on this site
[[NSBundle mainBundle] loadNibNamed:@"YourNibName" owner:self options:nil];
The problem is that, because we have to set the File Owner, this nib file becomes "attached" to this view controller. This view is subclass of UITableViewCell an...