Hi
I'm trying to create a UIScrollView with loop that contains a collection of ViewControllers. The answer to this question here shows the code that is the basis for what I'm trying to do. It uses images instead of viewControllers.
I've managed to get the all the viewControllers loaded (4) and displaying but the first view which is a...
An iphone app I'm working on is terminating periodically ... and I have a feeling it is because of how I'm accessing a shared NSArray amongst several view controllers. So ...
What is the best way to pass NSArray/NSMutableArray amongst several ViewControllers ... all of which can modify and/or set it to nil or whatever?
Thanks
...
Here is a quick overview of the controllers functionality in most of the application:
controller loads a specific model, gets data from it, formats the data and passes the formatted data to the view.
Now there is a search page, which needs to do a search query over entire database (all models). It needs to show each type of data in i...
What i'm trying to accomplish is to have an NSMutableArray defined in the AppDelegate. I then have two UIViewControllers. One view is responsible for displaying the array from the AppDelegate. The other view is used to add items to the array. So the array starts out to be empty. View1 doesn't display anything because the array is empty. ...
Hi
I need to block rotation to landscape orientation because my app crashes when it attempts to rotate views to landscape.
How do I block rotation to landscape and where can I setup the block such that it applies to all my views?
Thanks
...
I have a horizontal UIScrollView that contains UIButtons (though it could be any object). I would like to only download images for these buttons as the user scrolls and they are seen. I would also like an activityindicator running on each button while the images are downloading. Here's what I've tried with results:
Check content offset...
I have common functionality that I need to access from all screens of my app: a right bar button item and associated action.
So as not to repeat the code I would like to set this up in a custom UIViewController and have all my view controllers inherit from it.
- (void)viewDidLoad {
UIBarButtonItem *rightBarButton = [[UIBarButtonIte...
I've created some custom UITableViewCells in a nib file and would like to use that across multiple UIViewControllers.
Can anyone tell me the best practice way to do that? My limited knowledge around loading nibs seems to suggest that you have to specify a single owner class in Interface Builder.
Thanks.
...
Hi,
I recently started a project, using Apple's Utility Application example project. In the example project, there's an info button that shows an instance of FlipSideView. If you know the Weather.app, you know what the button acts like.
I then changed the MainWindow.xib to contain a scrollview in the middle of the window and a page-con...
I am doing an imaging app for iPad and it requires use of the entire screen. The approach I have used on iPhone does not appear to work on iPad. In Interface Builder I have set the UIToolbar to translucent.This code echos the dimensions of the main view before and after requesting fullscreen.
- (BOOL)application:(UIApplication *)applica...
I have a detail view that includes three UIButtons, each of which pushes a different view on to the stack. One of the buttons is connected to a MKMapView. When that button is pushed I need to send the latitude and longitude variables from the detail view to the map view. I'm trying to add the string declaration in the IBAction:
- (IBAct...
There have been some similar questions asked regarding Grid views, but none have been sufficiently answered (some have been left unanswered as the SDKs were under NDAs at the time).
The question is: Can anyone direct me towards a tutorial, or explain to me what steps to take to create a Grid View similar to iBooks, or the Yahoo! Enterta...
Hi,
I have following code in viewDidLoad
myViewController = [[UIViewController alloc] initWithNibName:@"myView" bundle:nil] ;
self.myView = myViewController.view;
[self.view addSubview:myView];
This code loads view from myView.nib (I have corresponding view controller m and h files of course). myView view has UITextField and other con...
Below is code that I'm using to swap views
MySecondViewController *tempVC = [[MySecondViewController alloc] initWithNibName:@"MySecondView"];
[self presentModalViewController:tempVC animated:YES];
[tempVC passDataWithString:@"a string" andColor:yellowcolor];
How can I get the cool page turning animation (as with iBook or ROAD RAGE SIG...
SignView *tempVC = [[SignView alloc] initWithNibName:@"SignView" bundle:Nil];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[UIView setAnimationDelay:0.5f];
[UIView setAnimationDuration:2.0f];
[UIView commitAnimations];
[self presentModalViewCon...
I'm having trouble getting a UIWebView to load a URL that I'm sending to it. Before I get into my code I was wondering if URL has to start with "http://" or can it start with "www."?
I'm using an IBAction to push a UIView on to the stack:
(IBAction)goToWebView {
WebViewController *webController = [[WebViewController alloc] initWithNib...
The documentation says that if I want to support both portrait and landscape, I basically have two ways of doing that:
Set up the viewcontroller's view so that the subviews autoresize correctly and make smaller changes programmatically at runtime
If the changes are more substantial, create an alternative landscape interface and push/po...
I use NSData to persist an image in my application. I save the image like so (in my App Delegate):
- (void)applicationWillTerminate:(UIApplication *)application
{
NSLog(@"Saving data");
NSData *data = UIImagePNGRepresentation([[viewController.myViewController myImage]image]);
//Write the file out!
NSArray *paths = NSSe...
I've got the following code in one of my view controllers:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
switch (indexPath.section) {
case 0: // "days" section tapped
{ DayPicker *dayPicker = [[DayPicker alloc] initWithStyle:UITableViewStylePlain];
dayPicker.rowL...
Having a simple Navigation Controller in place (starting the Navigation Based Application project) I created a new View with a XIB file.
on my HomeViewController (Home screen with all options as UIButton's I have:
@implementation HomeViewController
-(IBAction) optionChoosed:(UIButton *)button
{
NSString *msg = [NSString stringWith...