Search Results

Search found 198 results on 8 pages for 'tabbar'.

Page 8/8 | < Previous Page | 4 5 6 7 8 

  • How to make a UITextField move up when keyboard is present

    - by philfreo
    EDIT: Over 1k views with 3 upvotes? If this question is helpful, vote it up :) With the iPhone SDK: I have a UIView with UITextFields that brings up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the keyboard is brought up Automatically "jump" (by scrolling up) or shortening I know that I need a UIScrollView. I've tried changing the class of my UIView to a UIScrollView but I'm still unable to scroll the textboxes up or down. Do I need both a UIView and a UIScrollView? Does one go inside the other? [EDIT: I now know that you want a UIView inside of a UIScrollView, and the trick is to programatically set the content size of the UIScrollView to the frame size of the UIView.] Then what needs to be implemented in order to automatically scroll to the active text field? Ideally as much of the setup of the components as possible will be done in Interface Builder. I'd like to only write code for what needs it. Note: the UIView (or UIScrollView) that I'm working with is brought up by a tabbar (UITabBar), which needs to function as normal. Edit: I am adding the scroll bar just for when the keyboard comes up. Even though it's not needed, I feel like it provides a better interface because then the user can scroll and change textboxes, for example. I've got it working where I change the frame size of the UIScrollView when the keyboard goes up and down. I'm simply using: -(void)textFieldDidBeginEditing:(UITextField *)textField { //Keyboard becomes visible scrollView.frame = CGRectMake(scrollView.frame.origin.x, scrollView.frame.origin.y, scrollView.frame.size.width, scrollView.frame.size.height - 215 + 50); //resize } -(void)textFieldDidEndEditing:(UITextField *)textField { //keyboard will hide scrollView.frame = CGRectMake(scrollView.frame.origin.x, scrollView.frame.origin.y, scrollView.frame.size.width, scrollView.frame.size.height + 215 - 50); //resize } However this doesn't automatically "move up" or center the lower text fields in the visible area, which is what I would really like.

    Read the article

  • Opening a View with a Table without a NavigationController

    - by Ken
    Hiya, I'm pretty new to developing with Cocoa Touch/XCode and I came across a problem. I'm making a sort of RSS reader for a newssite and I have 5 views of tables navigated with 5 tabs in a TabBarController. If someone selects a newsitem I want another view to open showing the complete newsitem. My problem is that it won't work. This is my code: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection(NSInteger)section{ return [[[self rssParser]rssItems]count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"rssItemCell"]; if(nil == cell){ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"rssItemCell"]autorelease]; } cell.textLabel.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]title]; cell.detailTextLabel.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]description]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[self appDelegate] setCurrentlySelectedBlogItem:[[[self rssParser]rssItems]objectAtIndex:indexPath.row]]; [self.appDelegate loadNewsDetails]; } And it calls this method in my delegate: -(void)loadNewsDetails{ [[self rootController]pushViewController:detailController animated:YES]; } Please tell me what I'm doing wrong. BTW I do not want to use a NavigationController, just the tabbar I'm using. Thanks in advance, Ken

    Read the article

  • Monotouch.dialog and story board apps?

    - by Robin Diederen
    I'm trying to use mt.d; I've "drawn" an app using the storyboard feature of Xcode. My app consists of a tabbar which displays one of three viewcontrollers. Two out of three are simple viewcontrollers (single screens) and one is a splitviewcontroller. The splitview is tricky; using the stock xcode components I've drawn a master / table and a detail view. The table works as expected, but now I want to use mt.d to fill the detailview (later I need it to depend on the selection of the master, but not for now). I've subclassed the splitviewcontroller; in the viewdidload event I've created a mt.d dialogviewcontroller. Now I'm trying to push the dialogviewcontroller to the detailview, using the splitviewcontroller.viewcontrollers array. Doesn't seem to work; when running the app it still some an empty screen for the detail view (as drawn in xcode). Any clues for doing what I want? Thanx!

    Read the article

  • UITabBarControllerDelegate compare value of viewController

    - by T9
    I have a tabBar with 4 tabs on it, and I want to perform some action when a specific tab is selected, so I have uncommented the UITabBarControllerDelegate in the xxAppDelegate.m I also wanted to see the value that was being sent logged in the console - in order to test my "if" statement. However this is where I got stumped. // Optional UITabBarControllerDelegate method - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { NSLog(@"%@", viewController); } The console dutifully logged any selected controller that had been selected, but in this particular format: <MyViewController: 0x3b12950> Now, I wasn't expecting the square brackets or the colon or the Hex. So my question is how do I format my IF statement? This is what I thought would work but I get an error mentioned further down. // Optional UITabBarControllerDelegate method - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { NSLog(@"%@", viewController); if (viewController == MyViewController) { //do something nice here … }; } ... The error is "Expected expression before 'MyViewController'" Anyone know how I should be doing this?

    Read the article

  • iPhone: objc_class_name_TTTabStrip symbol not found build error

    - by user187532
    Hello friends, I am trying to implement 'scrollview' effect in 'Tabbar' which has 'TabItems'. I found that the good example is from 'facebook' open source 'TTCatlog' project 'Tabs' section. So i included all the source from it to my project and trying to build it. I have followed the following links to go ahead on this: http://stackoverflow.com/questions/822792/how-to-create-a-horizontal-scrolling-view-on-iphone source: http://github.com/facebook/three20/tree/master/samples/ My calling code is like below: _tabBar1 = [[TTTabStrip alloc] initWithFrame:CGRectMake(10, 68, 300, 28)]; _tabBar1.tabItems = [NSArray arrayWithObjects: [[[TTTabItem alloc] initWithTitle:@"Item 1"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 2"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 3"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 4"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 5"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 6"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 7"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 8"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 9"] autorelease], [[[TTTabItem alloc] initWithTitle:@"Item 10"] autorelease], nil]; [self.navigationController.view addSubview:_tabBar1]; My project folder as like below: ..../iphone/MyProgram/MyProgram.xcodeproj ..../iphone/Three20/src/Three20.... In my project settings for header search path, I have ../Three20/src But when i try to build it, it throws the following error: "objc_class_name_TTTabStrip symbol not found" "objc_class_name_TTTabItem symbol not found" I see there, all these files (.h and .m) are availbale there. Could someone please help what's wrong there and how do i get rid of this issue and continue working with it?

    Read the article

  • Verifying existence of name and password in NSUserDefaults to Skip a login/Screen

    - by Michael Robinson
    I have a Tabbar/Tableview App that modally loads a Login/Signup view when the app loads, I have set up a Root.plist in a settings bundle for the name and password and have successfully retrieved the items. I want to be able to do two things: 1) Do a test to see if the NSUserDefault Strings are empty and if so load the Login/Signup view. 2) If the strings are available then use the string contents to login to my Webservice. Thanks in advance. Here is my LoginViewController .m : @synthesize usernameField; @synthesize passwordField; @synthesize loginButton; @synthesize loginIndicator; @synthesize usernameLabel; @synthesize passwordLabel; -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; usernameLabel.text = [defaults objectForKey:kUsernameKey]; passwordLabel.text = [defaults objectForKey:kPasswordKey]; } - (void)viewDidAppear:(BOOL)animated { [self refreshFields]; [super viewDidAppear:animated]; } - (void)viewDidLoad { [super viewDidLoad]; [self refreshFields]; [self.navigationController setNavigationBarHidden:YES animated:NO]; } - (IBAction) login: (id) sender { { NSString *post =[NSString stringWithFormat:@"username=%@&password=%@",usernameField.text, passwordField.text]; NSString *hostStr = @"http:~iphone_login.php?"; hostStr = [hostStr stringByAppendingString:post]; NSData *dataURL = [NSData dataWithContentsOfURL: [ NSURL URLWithString: hostStr ]]; NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding]; NSLog(@"Site: %@",hostStr); NSLog(@"Site: %@",serverOutput); if([serverOutput isEqualToString:@"Yes"]){ UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Congrats" message:@"You are authorized " delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alertsuccess show]; [alertsuccess release];

    Read the article

  • iPhone: Animating a view when another view appears/disappears

    - by MacTouch
    I have the following view hierarchy UITabBarController - UINavigationController - UITableViewController When the table view appears (animated) I create a toolbar and add it as subview of the TabBar at the bottom of the page and let it animate in with the table view. Same procedure in other direction, when the table view disappears. It does not work as expected. The animation duration is OK, but somehow not exact the same as the animation of the table view when it becomes visible When I display the table view for the second time, the toolbar does not disappear at all and remains at the bottom of the parent view. What's wrong with it? - (void)animationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { UIView *toolBar = [[[self tabBarController] view] viewWithTag:1000]; [toolBar removeFromSuperview]; } - (void)viewWillAppear:(BOOL)animated { UIEdgeInsets insets = UIEdgeInsetsMake(0, 0, 44, 0); [[self tableView] setContentInset:insets]; [[self tableView] setScrollIndicatorInsets:insets]; // Toolbar initially placed outside of the visible frame (x=320) UIView *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(320, 480-44, 320, 44)]; [toolBar setTag:1000]; [[[self tabBarController] view] addSubview:toolBar]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:0.35]; [toolBar setFrame:CGRectMake(0, 480-44, 320, 44)]; [UIView commitAnimations]; [toolBar release]; [super viewWillAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { UIView *toolBar = [[[self tabBarController] view] viewWithTag:1000]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:0.35]; [UIView setAnimationDidStopSelector:@selector(animationDone:finished:context:)]; [toolBar setFrame:CGRectMake(320, 480-44, 320, 44)]; [UIView commitAnimations]; [super viewWillDisappear:animated]; }

    Read the article

  • UIWebview does not show up into UINavigationController

    - by Pato
    Hi I have a tabBar application. In the first tab, I have a navigation bar. In this navigation bar I have a table view. When the user clicks a cell of the table, it goes to another table view, and when the user clicks a cell in that table, it goes to a webview to open a web page. Basically, it goes fine until opening the webview. In the webview, viewDidLoad is called and seems to work properly. However, webViewDidStartLoad is never called and the web page never shows up. I am not using IB. I build the UITabBarController in the AppDelegate, where I also assign an instance of my UINavigationController for each tab. I call the webview from the second UITableViewController as follows: rssWebViewController = [[webViews objectAtIndex: indexPath.row] objectForKey:@"controller"]; [[self navigationController] pushViewController:rssWebViewController animated:YES]; I have checked that the navigationController is there and it seems just fine. The viewDidload of my webview is as follows: - (void)viewDidLoad { [super viewDidLoad]; NSString *urlAddress = self.storyUrl; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [[self rssWebView] setDelegate: self]; [[self view] addSubview:[self rssWebView]]; [rssWebView loadRequest:requestObj]; self.rssWebView.scalesPageToFit = YES; self.rssWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); } The web view controller interface is defined as follows: @interface RSSWebViewController : UIViewController <UIWebViewDelegate>{ IBOutlet UIWebView *rssWebView; IBOutlet NSString *storyUrl; IBOutlet NSString *feedName; } @property (nonatomic, retain) IBOutlet UIWebView *rssWebView; @property (nonatomic, retain) IBOutlet NSString *storyUrl; @property (nonatomic, retain) IBOutlet NSString *feedName; @end Any help is greatly appreciated.

    Read the article

  • Confused about UIView frame property

    - by slowfungus
    I'm building a prototype iPad app that draws diagrams. I have the following view hierarchy: UIView UIScrollView DiagramView : UIView TabBar NavigationBar And a UIViewController subclass holding all that together. Before drawing the diagram the first time I calculate the dimensions of the diagram, and set the DiagramView frame to that size, and the content size of the scrollview as well. -(void)recalculateBounds { [renderer diagram:diagram shouldDraw:NO]; SQXRect diagramRect = SQXMakeRect(0.0,0.0,[diagram bounds].size.width,[diagram bounds].size.height); self.frame = diagramRect; [(UIScrollView*)[self superview] setContentSize:diagramRect.size]; } I should disclose that the frame is being set to about 1500 x 3500 which i know is ridiculous. I just want to focus on some other parts of the app before I get into optimizing the render code. This works beautifully, except that the rect being passed to drawRect is not the size that I set, and my drawing is getting clipped at the bottom. Its close the size i set, but bigger in width, and shorter in height. Also of note, is the fact that if I force the frame to be much bigger than what I know the diagram needs, then the drawRect:rect is big enough, and no clipping occurs. Of course this has me wondering if the frame size needs to take into account some other screen real estate like the toolbars but my reading of the docs tells me the frame is in superview coordinates, which would be the scrollview so I reckon I need to worry about such things. Any idea what is causing this discrepancy?

    Read the article

  • drawRect gets called on UIView subclass but not on UIViewController

    - by HotFudgeSunday
    My code is working so far but I had to create a Class for the UIView. This is a bit inconvenient because I need to interact with the ViewController too. BTW, I did try [self setNeedsDisplay] on the ViewDidLoad of the UIViewController subclass file but it didn't work. Here's the code, which works on UIView Subclass but doesn't get called on a UIViewController one: - (void)drawRect:(CGRect)rect { UIColor *currentColor = [UIColor redColor]; CGContextRef context = UIGraphicsGetCurrentContext(); someNum = 1; CGContextBeginPath(context); CGContextMoveToPoint(context, 30, 40); [self addDotImageX:30 andY:40]; CGContextSetLineWidth(context, 2); CGContextSetStrokeColorWithColor(context, currentColor.CGColor); CGContextStrokePath(context); } Any ideas on what to try? BTW, this is a TabBar App. I know those can somehow block the calls to drawRect. The Tabs where created programatically, not through a Nib. Eg: NSMutableArray *listOfViewControllers = [[NSMutableArray alloc] init]; UIViewController *vc; vc = [[Education alloc] init]; vc.title = @"Education"; [listOfViewControllers addObject:vc]; vc.tabBarItem.image = [UIImage imageNamed:@"info.png"]; [vc release]; I would appreciate any ideas. I've been through the answers on this site related to setNeedsDisplay not calling drawRect and haven't found an answer for my particular case. Thanks.

    Read the article

  • iPhone dev: UIBarButtonItem or title not showing up in NavigationBar

    - by IceMan85
    Hello everyone, here my problem. I have a NavigationBar at the top, a TabBar at the bottom and a TableView at the center of the screen. Very normal situation. I set it all up in IB and I have set this in the app delegate : ExpensesListNavController *expensesListNavController; This in order to be able to add new views to the stack. I need to have 3 levels: - list of items in a TableView - OK - firstLevel: once pressed one cell a view is added to the stack - OK - second level: one pressed the "modify" button on the navBar on the firstLevel I want to show a new view that can be customized by the user. My Problem is coming when trying to add the "Modify" button in the "firstLevelView". Here-below my code -(IBAction) modify:(id)sender { if (editableDetailViewController == nil) { editableDetailViewController = [[editableDetailViewController alloc] init]; } editableDetailViewController.expense = expense; [appDelegate.expensesListNavController pushViewController:editableDetailViewController animated:YES]; editableDetailViewController = nil; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; appDelegate = [[UIApplication sharedApplication] delegate]; UIBarButtonItem *modifyButton = [[UIBarButtonItem alloc] initWithTitle:@"Modify" style:UIBarButtonItemStylePlain target:self action:@selector(modify:)]; appDelegate.expensesListNavController.navigationItem.rightBarButtonItem = modifyButton; appDelegate.expensesListNavController.navigationItem.title = @"Titoloooo"; NSLog(@"NavBar button has just been set !!"); [modifyButton release]; Nothing is being showed, neither title nor the button. Do you have any idea of what is happening ?? I really cannot figure out !!! Thanks a lot in advance, AM

    Read the article

  • cannot dismiss the email composer view in iphone?

    - by Warrior
    I am new to iphone development.I have created a tabbar based application . In the first i want the email composer to be displayed. I am able to display it but the cancel and send button are not working,I don't know where do i go wrong .Please help me out. Here is my code. - (void)viewDidLoad { [super viewDidLoad]; [self displayComposerSheet]; } -(void)displayComposerSheet { picker = [[MFMailComposeViewController alloc] init]; [[picker navigationBar] setTintColor:[UIColor blackColor]]; picker.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { [picker setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]]; [picker setSubject:@"Sample"]; } [self.view addSubview:picker.view]; [self presentModalViewController:picker animated:YES]; } - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { switch (result) { case MFMailComposeResultCancelled: alert = [[UIAlertView alloc] initWithTitle:@"Message Cancelled!" message:@"Your email has cancelled to send" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert release]; break; case MFMailComposeResultSaved: alert = [[UIAlertView alloc] initWithTitle:@"Message Saved!" message:@"Your email has saved to send" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert release]; break; case MFMailComposeResultSent: alert = [[UIAlertView alloc] initWithTitle:@"Message Sent!" message:@"Your email has to sent" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert release];; break; case MFMailComposeResultFailed: alert = [[UIAlertView alloc] initWithTitle:@"Message Failed!" message:@"Your email has cancelled to send" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert show]; [alert release]; break; default: alert = [[UIAlertView alloc] initWithTitle:@"Message Failed!" message:@"Your email has not to send" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; [alert release]; break; } [self dismissModalViewControllerAnimated:YES]; }

    Read the article

  • Unbalanced calls to begin/end appearance transitions for <ViewController>,<Tab>

    - by onkar
    I am trying to implement Tabs into my secondView.On button touch(from ViewController.m) I am navigating to secondView(Tabs). In my Tabs.xib file I have added a TabBar at bottom and it is custom class of UITabBar. ViewController.m - (IBAction)touchedInside:(id)sender { NSLog(@"touhced up inside"); Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController pushViewController:temp animated:YES]; [self presentViewController:temp animated:YES completion:nil]; } Tabs.m - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; UITabBarController *tabBarController = [[UITabBarController alloc]init]; /* Tab_1 *firstView = [[Tab_1 alloc] init]; UITabBarItem *item1 = [[UITabBarItem alloc]initWithTitle:@"First" image:nil tag:1]; [firstView setTabBarItem:item1]; NSLog(@"after first tab is added"); Tab_2 *secondView = [[Tab_2 alloc] init]; UITabBarItem *item2 = [[UITabBarItem alloc]initWithTitle:@"Sec" image:nil tag:1] ; [secondView setTabBarItem:item2]; NSLog(@"after second tab is added"); [tabBarController setViewControllers:[NSArray arrayWithObjects:firstView,secondView,nil] animated:NO]; NSLog(@"after tab is added"); [appDelegate.window addSubview:tabBarController.view]; NSLog(@"after view is added"); */ appDelegate.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. UIViewController *viewController1 = [[Tab_1 alloc] initWithNibName:@"Tab 1" bundle:nil]; UIViewController *viewController2 = [[Tab_2 alloc] initWithNibName:@"Tab 2" bundle:nil]; UIViewController *viewController3 = [[Tab_2 alloc] initWithNibName:@"Tab 1" bundle:nil]; tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, nil]; appDelegate.window.rootViewController = self.tabBarController; [appDelegate.window makeKeyAndVisible]; Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController presentModalViewController:temp animated:NO]; } Errors Unbalanced calls to begin/end appearance transitions for <ViewController: 0x6833c80>. 2012-12-06 09:57:48.963 demoTabs[667:f803] Unbalanced calls to begin/end appearance transitions for <Tabs: 0x6a3fc90>.

    Read the article

  • NavigationBar from UINavigationController not positioned correctly

    - by David Liu
    So, my iPad program has a pseudo-split view controller (one that I implemented, not base SDK one), and was working correctly a while ago. It has the basic layout (UINavController for master, content view controller for detail on right), but I have it so the master view doesn't disappear when rotated into portrait view. Recently, I added in a UITabBarController to contain the entire split view, which has made the navigation bar go wonky, while all the other views are positioned fine. In addition, the navigation bar only gets mispositioned when the program starts up while the iPad is in landscape, or upside-down portrait. If it starts out in portrait, everything is fine. Relevant Code: RootViewController.m: - (void)loadView { navController = [[NavigationBreadcrumbsController_Pad alloc] init]; ABTableViewController_Pad * tableViewController = [[ABTableViewController_Pad alloc] initWithNibName:@"ABTableView"]; master = [[UINavigationController_Pad alloc] initWithRootViewController:tableViewController]; [tableViewController release]; // Dummy blank UIViewcontroller detail = [[UIViewController alloc] init]; detail.view = [[[UIView alloc] init] autorelease]; [detail.view setBackgroundColor:[UIColor grayColor]]; self.view = [[[UIView alloc] init] autorelease]; self.view.backgroundColor = [UIColor blackColor]; [self positionViews]; [self.view addSubview:navToolbarController.view]; [self.view addSubview:master.view]; [self.view addSubview:detail.view]; } // Handles the respositioning of view into it's current orientation -(void)positionViews{ CGFloat tabBarOffset = 0; if(self.tabBarController){ tabBarOffset = self.tabBarController.tabBar.frame.size.height; } if(self.interfaceOrientation == UIInterfaceOrientationPortrait || self.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { self.view.frame = CGRectMake(0, 0, 768, 1004); navController.view.frame = CGRectMake(0,0,768,44); //adjust master view [master.view setFrame:CGRectMake(0, 44, 320, 1024 - 44 - 20 - tabBarOffset)]; //adjust detail view [detail.view setFrame:CGRectMake(321,44, 448, 1024 - 44 - 20 - tabBarOffset)]; } // Landscape Layout else{ self.view.frame = CGRectMake(0, 0, 748, 1024); navToolbarController.view.frame = CGRectMake(0,0,1024,44); //adjust master view [master.view setFrame:CGRectMake(0, 44, 320, 768 - 44 - 20 - tabBarOffset)]; //adjust detail view [detail.view setFrame:CGRectMake(321,44, 1024 - 320, 768 - 44 - 20 - tabBarOffset)]; } }

    Read the article

  • I want to get the value from one class (SearchTableViewController.m) to another class (HistoryTableV

    - by ahmet732
    #import <UIKit/UIKit.h> @class SearchDetailViewController; @interface SearchTableViewController : UITableViewController <UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource>{ IBOutlet UITableView *myTableView; NSMutableArray *tableData;//will be storing data that will be displayed in table. //Search array den buna aktarma yapcaz ilerde görceksin. NSMutableArray *searchedData;//will be storing data matching with the search string UISearchBar *sBar;//search bar NSMutableArray *searchArray; // It holds the medicines that are shown in tableview SearchDetailViewController * searchDetailViewController; NSMutableArray *deneme; } @property(nonatomic,retain)UISearchBar *sBar; @property(nonatomic,retain)IBOutlet UITableView *myTableView; @property(nonatomic,retain)NSMutableArray *tableData; @property(nonatomic,retain)NSMutableArray *searchedData; @property (nonatomic, retain) NSMutableArray *searchArray; @property (nonatomic, retain) SearchDetailViewController *searchDetailViewController; @property (nonatomic, copy) NSMutableArray *deneme; @end SearchTableViewController.m - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; **deneme= [[NSMutableArray alloc]init]; deneme=[tableData objectAtIndex:indexPath.row];** ****NSLog(@"my row = %@", deneme);**// I holded one of the selected cells here** HistoryTableViewController.m - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; **SearchTableViewController *obj= [[SearchTableViewController alloc]init];** **NSLog(@"my 2nd row= %@", [obj deneme]); //it prints nil** } My project is TabBar. There are two buttons on it- Search and History. I want to display selected items in a table in History tab. But i can not bring the selected item from SearchTableViewController.m to the class (HistoryTableViewController.m) The problem is : I can hold one of the selected items in an array (named deneme)from table in SearchTableViewController.m but i can not take it to HistoryTableViewController.m. It prints nil in console screen.... If I can make it visible in History class, I display those selected items on table. Please help me !!!

    Read the article

  • Re-Add tabBarController's view into window and the device is in landscape mode

    - by user285553
    Hello, I have an app that is a tabBarController based app. I have 4 tabs on it and one of these is for logging in/out in my app. The main ideea is that when I logout, I release the tabBarController (this will release the all 4 view controllers too - I have done this becuse I want to refersh all the views after logging out to look just like the first time).After this, I alloc it again and add the view controllers aagin,set the tabBarItem's titles,etc.This work ok. The problem is when I am in landscape mode;my logout view is painted to fit the landscape area,but after disconnect(now I releasse and alloc again the tabbarController) the view is painted in portrait mode but my device is in lanscape. After disconnected, I call the releaseOldTabView and the createNewTabView.After this tabBarController is in portrait insead of landscape. -(void)releaseOldTabView:(BOOL)tabViewEnabled{ if(tabViewEnabled){ [tabBarController.view removeFromSuperview]; [tabBarController release]; } } -(void)createNewTabView{ tabBarController = [[UITabBarController alloc] init]; NSMutableArray *oneArray = [[NSMutableArray alloc] init]; tabBarController.delegate = self; LoginViewController *login= [[LoginViewController2 alloc] initWithNibName:@"LoginViewController" bundle:nil]; SecondViewController *secondController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; ThirdViewController *thirdController = [[ThirdViewController alloc] init]; FourthViewController *fourthController = [[FourthViewController alloc] init]; login.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Login" image:[UIImage imageNamed:@"connect.png"] tag:0]; secondController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar2" image:[UIImage imageNamed:@"tabBar2.png"] tag:1]; thirdController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar3" image:[UIImage imageNamed:@"tabBar3.png"] tag:2]; fourthController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar4" image:[UIImage imageNamed:@"tabBar4.png"] tag:3]; [oneArray addObject:login]; [oneArray addObject:secondController]; [oneArray addObject:thirdController]; [oneArray addObject:fourthController]; [tabBarController setViewControllers:oneArray]; //[tabBarController.view convertRect:tabBarController.view.frame toView:window]; [window addSubview:tabBarController.view]; [oneArray release]; [login release]; [secondController release]; [thirdController release]; [fourthController release]; } After calling this method, the tabbar view is in portrait,but statusBar(the top bar which says the carrier name) is painted normally(landscape). I also tried the [tabBarController.view convertRect:tabBarController.view.frame toView:window]; but without any succes. Can anyone give a hand of help? Thanks in advance, Alex.

    Read the article

  • My UITabBarController isn't appearing, but its first view is?

    - by E-Madd
    I've done some reorganizing of my project recently and now I'm not seeing my tab bar controller, but its first view controller's view is appearing. Here's a breakdown of everything that happens prior to the problem. App Delegate loads FirstViewController with nib. FirstViewController loads the application data from my server and then presents MainViewController with a modal transition. MainViewController is where the UITabBarController is supposed to be appearing. It's a very simple class. The .h @interface MainViewController : UIViewController <UITabBarControllerDelegate> { IBOutlet UITabBarController *tabBarController; } @property (nonatomic, retain) UITabBarController *tabBarController; @end The .m @implementation MainViewController @synthesize tabBarController; - (void)viewDidLoad { NSLog(@"MainViewController viewDidLoad"); //set tab bar controller delegate to self tabBarController.delegate = self; // home view HomeViewController *home = [[HomeViewController alloc] initWithTab]; // menu view MenuViewController *menu = [[MenuViewController alloc] initWithTab]; // special offers view SpecialOffersViewController *so = [[SpecialOffersViewController alloc] initWithTab]; // events view EventsViewController *events = [[EventsViewController alloc] initWithTab]; // info view InfoViewController *info = [[InfoViewController alloc] initWithTab]; //populate the tab bar controller with view controllers NSArray *controllers = [NSArray arrayWithObjects:home, menu, so, events, info, nil]; tabBarController.viewControllers = controllers; //release view controllers [home release]; [menu release]; [so release]; [events release]; [info release]; [controllers release]; //add tab bar controller to view [self.view addSubview:tabBarController.view]; [super viewDidLoad]; } and here's the bit from FirstViewController that modally presents the MainViewController... MainViewController *controller = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil]; controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; I'm not getting any compiler errors or warnings and the app runs swell... no crashing. It just isn't showing the darned TabBar, and it used to when I was creating it on my AppDelegate. I checked everything in my NIB and my outlets seem to be hooked up ok. I have no idea what's happened. Help!

    Read the article

  • issue of hide uipickerview in iphone

    - by M007
    I want to display UIPickerView with UIToolBar on the top of pickerView with done and cancel button.Attached is the screen shot for the same.I also have tab bar controller in bottom side of view and I want to display pickerView over bottom bar thats why I am using uipickerView inside of actionsheet.Now my issue is how to dismiss that pickerView on cancelButton click which is added in UIActionSheet? Following is the function to display pickerView : -(IBAction)setMile:(id)sender { menu = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; // Add the picker UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0,55,0,0)]; pickerView.delegate = self; pickerView.showsSelectionIndicator = YES; // note this is default to NO UIToolbar *pickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0,0,320,44)]; pickerToolbar.barStyle = UIBarStyleBlackOpaque; [pickerToolbar sizeToFit]; NSMutableArray *barItems = [[NSMutableArray alloc] init]; UIBarButtonItem *cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(setMileCancel:)]; [barItems addObject:cancelBtn]; [cancelBtn release]; cancelBtn=nil; UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; [barItems addObject:flexSpace]; [flexSpace release]; flexSpace=nil; UIBarButtonItem *doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(setMileDone:)]; [barItems addObject:doneBtn]; [doneBtn release]; doneBtn=nil; [pickerToolbar setItems:barItems animated:YES]; [barItems release]; barItems=nil; [menu addSubview:pickerToolbar]; [menu addSubview:pickerView]; [menu showInView:self.view]; //[menu showFromTabBar:[[self tabBarController] tabBar]]; this code is not working [menu setBounds:CGRectMake(0,0,320, 545)]; [pickerView release]; [menu release]; pickerView=nil; menu=nil; } I have following code on cancel button click -(IBAction)setMileCancel:(id)sender { //[menu removeFromSuperview]; [menu dismissWithClickedButtonIndex:0 animated:YES]; }

    Read the article

  • How to configure emacs by using this file?

    - by Andy Leman
    From http://public.halogen-dg.com/browser/alex-emacs-settings/.emacs?rev=1346 I got: (setq load-path (cons "/home/alex/.emacs.d/" load-path)) (setq load-path (cons "/home/alex/.emacs.d/configs/" load-path)) (defconst emacs-config-dir "~/.emacs.d/configs/" "") (defun load-cfg-files (filelist) (dolist (file filelist) (load (expand-file-name (concat emacs-config-dir file))) (message "Loaded config file:%s" file) )) (load-cfg-files '("cfg_initsplit" "cfg_variables_and_faces" "cfg_keybindings" "cfg_site_gentoo" "cfg_conf-mode" "cfg_mail-mode" "cfg_region_hooks" "cfg_apache-mode" "cfg_crontab-mode" "cfg_gnuserv" "cfg_subversion" "cfg_css-mode" "cfg_php-mode" "cfg_tramp" "cfg_killbuffer" "cfg_color-theme" "cfg_uniquify" "cfg_tabbar" "cfg_python" "cfg_ack" "cfg_scpaste" "cfg_ido-mode" "cfg_javascript" "cfg_ange_ftp" "cfg_font-lock" "cfg_default_face" "cfg_ecb" "cfg_browser" "cfg_orgmode" ; "cfg_gnus" ; "cfg_cyrillic" )) ; enable disabled advanced features (put 'downcase-region 'disabled nil) (put 'scroll-left 'disabled nil) (put 'upcase-region 'disabled nil) ; narrow cursor ;(setq-default cursor-type 'hbar) (cua-mode) ; highlight current line (global-hl-line-mode 1) ; AV: non-aggressive scrolling (setq scroll-conservatively 100) (setq scroll-preserve-screen-position 't) (setq scroll-margin 0) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ange-ftp-passive-host-alist (quote (("redbus2.chalkface.com" . "on") ("zope.halogen-dg.com" . "on") ("85.119.217.50" . "on")))) '(blink-cursor-mode nil) '(browse-url-browser-function (quote browse-url-firefox)) '(browse-url-new-window-flag t) '(buffers-menu-max-size 30) '(buffers-menu-show-directories t) '(buffers-menu-show-status nil) '(case-fold-search t) '(column-number-mode t) '(cua-enable-cua-keys nil) '(user-mail-address "[email protected]") '(cua-mode t nil (cua-base)) '(current-language-environment "UTF-8") '(file-name-shadow-mode t) '(fill-column 79) '(grep-command "grep --color=never -nHr -e * | grep -v .svn --color=never") '(grep-use-null-device nil) '(inhibit-startup-screen t) '(initial-frame-alist (quote ((width . 80) (height . 40)))) '(initsplit-customizations-alist (quote (("tabbar" "configs/cfg_tabbar.el" t) ("ecb" "configs/cfg_ecb.el" t) ("ange\\-ftp" "configs/cfg_ange_ftp.el" t) ("planner" "configs/cfg_planner.el" t) ("dired" "configs/cfg_dired.el" t) ("font\\-lock" "configs/cfg_font-lock.el" t) ("speedbar" "configs/cfg_ecb.el" t) ("muse" "configs/cfg_muse.el" t) ("tramp" "configs/cfg_tramp.el" t) ("uniquify" "configs/cfg_uniquify.el" t) ("default" "configs/cfg_font-lock.el" t) ("ido" "configs/cfg_ido-mode.el" t) ("org" "configs/cfg_orgmode.el" t) ("gnus" "configs/cfg_gnus.el" t) ("nnmail" "configs/cfg_gnus.el" t)))) '(ispell-program-name "aspell") '(jabber-account-list (quote (("[email protected]")))) '(jabber-nickname "AVK") '(jabber-password nil) '(jabber-server "halogen-dg.com") '(jabber-username "alex") '(remember-data-file "~/Plans/remember.org") '(safe-local-variable-values (quote ((dtml-top-element . "body")))) '(save-place t nil (saveplace)) '(scroll-bar-mode (quote right)) '(semantic-idle-scheduler-idle-time 432000) '(show-paren-mode t) '(svn-status-hide-unmodified t) '(tool-bar-mode nil nil (tool-bar)) '(transient-mark-mode t) '(truncate-lines f) '(woman-use-own-frame nil)) ; ?? ????? ??????? y ??? n? (fset 'yes-or-no-p 'y-or-n-p) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(compilation-error ((t (:foreground "tomato" :weight bold)))) '(cursor ((t (:background "red1")))) '(custom-variable-tag ((((class color) (background dark)) (:inherit variable-pitch :foreground "DarkOrange" :weight bold)))) '(hl-line ((t (:background "grey24")))) '(isearch ((t (:background "orange" :foreground "black")))) '(message-cited-text ((((class color) (background dark)) (:foreground "SandyBrown")))) '(message-header-name ((((class color) (background dark)) (:foreground "DarkGrey")))) '(message-header-other ((((class color) (background dark)) (:foreground "LightPink2")))) '(message-header-subject ((((class color) (background dark)) (:foreground "yellow2")))) '(message-separator ((((class color) (background dark)) (:foreground "thistle")))) '(region ((t (:background "brown")))) '(tooltip ((((class color)) (:inherit variable-pitch :background "IndianRed1" :foreground "black"))))) The above is a python emacs configure file. Where should I put it to use it? And, are there any other changes I need to make?

    Read the article

  • Multi-level navigation controller on left-hand side of UISplitView with a small twist.

    - by user141146
    Hi. I'm trying make something similar to (but not exactly like) the email app found on the iPad. Specifically, I'd like to create a tab-based app, but each tab would present the user with a different UISplitView. Each UISplitView contains a Master and a Detail view (obviously). In each UISplitView I would like the Master to be a multi-level navigational controller where new UIViewControllers are pushed onto (or popped off of) the stack. This type of navigation within the UISplitView is where the application is similar to the native email app. To the best of my knowledge, the only place that has described a decent "splitviewcontroller inside of a uitabbarcontroller" is here: http://stackoverflow.com/questions/2475139/uisplitviewcontroller-in-a-tabbar-uitabbarcontroller and I've tried to follow the accepted answer. The accepted solution seems to work for me (i.e., I get a tab-bar controller that allows me to switch between different UISplitViews). The problem is that I don't know how to make the left-hand side of the UISplitView to be a multi-level navigation controller. Here is the code I used within my app delegate to create the initial "split view 'inside' of a tab bar controller" (it's pretty much as suggested in the aforementioned link). - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSMutableArray *tabArray = [NSMutableArray array]; NSMutableArray *array = [NSMutableArray array]; UISplitViewController *splitViewController = [[UISplitViewController alloc] init]; MainViewController *viewCont = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil]; [array addObject:viewCont]; [viewCont release]; viewCont = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; [array addObject:viewCont]; [viewCont release]; [splitViewController setViewControllers:array]; [tabArray addObject:splitViewController]; [splitViewController release]; array = [NSMutableArray array]; splitViewController = [[UISplitViewController alloc] init]; viewCont = [[Master2 alloc] initWithNibName:@"Master2" bundle:nil]; [array addObject:viewCont]; [viewCont release]; viewCont = [[Slave2 alloc] initWithNibName:@"Slave2" bundle:nil]; [array addObject:viewCont]; [viewCont release]; [splitViewController setViewControllers:array]; [tabArray addObject:splitViewController]; [splitViewController release]; // Add the tab bar controller's current view as a subview of the window [tabBarController setViewControllers:tabArray]; [window addSubview:tabBarController.view]; [window makeKeyAndVisible]; return YES; } the class MainViewController is a UIViewController that contains the following method: - (IBAction)push_me:(id)sender { M2 *m2 = [[[M2 alloc] initWithNibName:@"M2" bundle:nil] autorelease]; [self.navigationController pushViewController:m2 animated:YES]; } this method is attached (via interface builder) to a UIButton found within MainViewController.xib Obviously, the method above (push_me) is supposed to create a second UIViewController (called m2) and push m2 into view on the left-side of the split-view when the UIButton is pressed. And yet it does nothing when the button is pressed (even though I can tell that the method is called). Thoughts on where I'm going wrong? TIA!

    Read the article

  • iPhone SDK 3.0 and symbolicatecrash not getting along?

    - by Steve
    * UPDATE * I've reinstalled with Snow Leopard, clean install. Completely wiped my existing Leopard install. Same problem persists. I've tried numbers of versions of symbolicatecrash to resolve symbols in my crash reports. From the version provided by Apple, to Alan's Quatermain's version posted on GitHub and finally from http://openradar.appspot.com/6438643. For whatever reason, the best results I can get is for symbols on my own libraries to get resolved. Normally, this is enough data to point me in the right direction -- other times it is not. With 2.x I had no problems getting the symbols for my code + Apple provided libraries from within the stack traces in each thread. Most likely an issue with my environment here, I'm not at all doubting the work that Apple or Alan have done. Yes I'm certain the dSYM I have stashed away is the same exact one that's generating the crash report. Although 'Foo' is me, and getting symbols from it is wonderful, I need to see symbols from the other functions in the stack to truly understand my reports. Note: For devices that crash running the app on iPhone OS 2.2.1, I have no problem getting all symbols. This is an iPhone OS 3.0 issue it appears. Also, while running symbolicatecrash in verbose mode here's a few of the things that struck me as wrong: - NO MATCH NOT searching in Spotlight for dsym with UUID of /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation ## Warning: Can't find any unstripped binary that matches version of /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation ..........fetching symbol file for libobjc.A.dylib--[undef] Searching [/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A345)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A347)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.1 (5B108)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.2 (5C1)/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2.1/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2/Symbols/usr/lib/libobjc.A.dylib /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/Symbols/usr/lib/libobjc.A.dylib]...--[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A345)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0 (5A347)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.1 (5B108)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.0.2 (5C1)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2.1/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/2.2/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH --[/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)/Symbols/usr/lib/libobjc.A.dylib] -- NO MATCH NOT searching in Spotlight for dsym with UUID of /usr/lib/libobjc.A.dylib ## Warning: Can't find any unstripped binary that matches version of /usr/lib/libobjc.A.dylib Here's an example of the crash report after running it through symbolicatecrash: Thread 0 Crashed: 0 libSystem.B.dylib 0x31dc476c 0x31d46000 + 517996 1 libSystem.B.dylib 0x31dc4755 0x31d46000 + 517973 2 Foo 0x00053075 uncaught_exception_handler + 21 3 CoreFoundation 0x3028f65f 0x301fd000 + 599647 4 libobjc.A.dylib 0x30013693 0x3000c000 + 30355 5 libstdc++.6.dylib 0x374ccc2d 0x3748a000 + 273453 6 libstdc++.6.dylib 0x374ccc81 0x3748a000 + 273537 7 libstdc++.6.dylib 0x374ccd4d 0x3748a000 + 273741 8 libobjc.A.dylib 0x300135ff 0x3000c000 + 30207 9 CoreFoundation 0x30222f2d 0x301fd000 + 155437 10 CoreFoundation 0x30222ecb 0x301fd000 + 155339 11 Foundation 0x30521e33 0x30501000 + 134707 12 Foundation 0x30570d47 0x30501000 + 458055 13 Foo 0x0000a1db -[Bar barfoo] (Bar.m:1617) 14 Foo 0x00032f73 -[MyViewController foobar] (MyViewController.m:727) 15 Foo 0x000329b9 -[MyViewController foobar] (MyViewController.m:666) 16 Foo 0x00031fab -[MyViewController tabBar:tabSelected:] (MyViewController.m:440) 17 Foo 0x00068d41 -[TTTabBar setSelectedTabIndex:] (TTTabBar.m:160) 18 Foo 0x00068ca3 -[TTTabBar setSelectedTabView:] (TTTabBar.m:142) 19 Foo 0x000689cf -[TTTabBar tabTouchedUp:] (TTTabBar.m:83) 20 CoreFoundation 0x302552f9 0x301fd000 + 361209 21 UIKit 0x3094d101 0x308ed000 + 393473 22 UIKit 0x3094d0a1 0x308ed000 + 393377 23 UIKit 0x3094d073 0x308ed000 + 393331 24 UIKit 0x3094cdcd 0x308ed000 + 392653 25 UIKit 0x309779c1 0x308ed000 + 567745 26 UIKit 0x30977011 0x308ed000 + 565265 27 UIKit 0x309767d9 0x308ed000 + 563161 28 UIKit 0x30923613 0x308ed000 + 222739 29 UIKit 0x30923163 0x308ed000 + 221539 30 GraphicsServices 0x32045a4d 0x32041000 + 19021 31 CoreFoundation 0x30253041 0x301fd000 + 352321 32 CoreFoundation 0x30252771 0x301fd000 + 350065 33 GraphicsServices 0x32044b0f 0x32041000 + 15119 34 GraphicsServices 0x32044bbb 0x32041000 + 15291 35 UIKit 0x308f0363 0x308ed000 + 13155 36 UIKit 0x308ef121 0x308ed000 + 8481 37 Foo 0x00002097 main (main.m:13)

    Read the article

  • Why i cannot get the frame of a UIView in order to move it? The view is defined.

    - by Jann
    I am creating a nav-based app with a view that floats at the bottom of the screen (Alpha .7 most of the time). I create it like this... // stuff to create the tabbar/nav bar. // THIS ALL WORKS... // then add it to subview. [window addSubview:tabBarController.view]; // need this last line to display the window (and tab bar controller) [window makeKeyAndVisible]; // Okay, here is the code i am using to create a grey-ish strip exactly `zlocationAccuracyHeight` pixels high at `zlocationAccuracyVerticalStartPoint` starting point vertically. CGRect locationManagerAccuracyUIViewFrame = CGRectMake(0,zlocationAccuracyVerticalStartPoint,[[UIScreen mainScreen] bounds].size.width,zlocationAccuracyHeight); self.locationManagerAccuracyUIView = [[UIView alloc] initWithFrame:locationManagerAccuracyUIViewFrame]; self.locationManagerAccuracyUIView.autoresizingMask = (UIViewAutoresizingFlexibleWidth); self.locationManagerAccuracyUIView.backgroundColor = [UIColor darkGrayColor]; [self.locationManagerAccuracyUIView setAlpha:0]; CGRect locationManagerAccuracyLabelFrame = CGRectMake(0, 0,[[UIScreen mainScreen] bounds].size.width,zlocationAccuracyHeight); locationManagerAccuracyLabel = [[UILabel alloc] initWithFrame:locationManagerAccuracyLabelFrame]; if ([myGizmoClass useLocationServices] == 0) { locationManagerAccuracyLabel.text = @"GPS Accuracy: Using Manual Location"; } else { locationManagerAccuracyLabel.text = @"GPS Accuracy: One Moment Please..."; } locationManagerAccuracyLabel.font = [UIFont boldSystemFontOfSize:12]; locationManagerAccuracyLabel.textAlignment = UITextAlignmentCenter; locationManagerAccuracyLabel.textColor = [UIColor whiteColor]; locationManagerAccuracyLabel.backgroundColor = [UIColor clearColor]; [locationManagerAccuracyLabel setAlpha:0]; [self.locationManagerAccuracyUIView addSubview: locationManagerAccuracyLabel]; [window addSubview: self.locationManagerAccuracyUIView]; this all works (i am not sure about the order i create the uiview in ... meaning i am creating the frame, the view, creating the "accuracy text" and adding that to the view, then adding the uiview as a subview of the window . It works and seems correct in my logic. So, here is the tough part. I have a timer that i am testing with. I am trying to float the uiview up by 30 pix. here is that code: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; CGRect rect = [ self.locationManagerAccuracyUIView frame]; NSLog(@"ORIGIN: %d x %d (%@)\n",rect.origin.x,rect.origin.y,rect); rect.origin.y -= 30; [UIView commitAnimations]; The problem? rect is nill, rect.origin.x and rect.origin.y are both zero. Can anyone tell me why? Here is how i set up self.locationManagerAccuracyUIView in my files: Delegate.h UIView *locationManagerAccuracyUIView; UILabel *locationManagerAccuracyLabel; ... @property (nonatomic, retain) IBOutlet UIView *locationManagerAccuracyUIView; @property (nonatomic, retain) IBOutlet UILabel *locationManagerAccuracyLabel; Delegate.m ... @synthesize locationManagerAccuracyUIView; @synthesize locationManagerAccuracyLabel; ... BTW: Other places in another timer i DO set the alpha to fade in and out and THAT works! So locationManagerAccuracyUIView is valid and defined as a view... For instance: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; [locationManagerAccuracyLabel setAlpha:1]; [UIView commitAnimations]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; [self.locationManagerAccuracyUIView setAlpha:.7]; [UIView commitAnimations]; ...and it DOES work. Can anyone help me? As an aside: I know, when typing this I used self.locationManagerAccuracyUIView and locationManagerAccuracyUIView interchangeably to see if for some reason that was the issue. It is not. :) Thx

    Read the article

  • UITextView doesn't not resize when keyboard appear if loaded from a tab bar cotroller

    - by elio.d
    I have a simple view controller (SecondViewController) used to manage a UITextview (I'm building a simple editor) this is the code of the SecondViewController.h @interface SecondViewController : UIViewController { IBOutlet UITextView *textView; } @property (nonatomic,retain) IBOutlet UITextView *textView; @end and this is the SecondViewController.m // // EditorViewController.m // Editor // // Created by elio d'antoni on 13/01/11. // Copyright 2011 none. All rights reserved. // @implementation SecondViewController @synthesize textView; /* // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"uiViewBg.png"]]; textView.layer.borderWidth=1; textView.layer.cornerRadius=5; textView.layer.borderColor=[[UIColor darkGrayColor] CGColor]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillAppear:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillDisappear:) name:UIKeyboardWillHideNotification object:nil]; } -(void) matchAnimationTo:(NSDictionary *) userInfo { NSLog(@"match animation method"); [UIView setAnimationDuration:[[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]]; [UIView setAnimationCurve:[[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] intValue]]; } -(CGFloat) keyboardEndingFrameHeight:(NSDictionary *) userInfo { NSLog(@"keyboardEndingFrameHeight method"); CGRect keyboardEndingUncorrectedFrame = [[ userInfo objectForKey:UIKeyboardFrameEndUserInfoKey ] CGRectValue]; CGRect keyboardEndingFrame = [self.view convertRect:keyboardEndingUncorrectedFrame fromView:nil]; return keyboardEndingFrame.size.height; } -(CGRect) adjustFrameHeightBy:(CGFloat) change multipliedBy:(NSInteger) direction { NSLog(@"adjust method"); return CGRectMake(20, 57, self.textView.frame.size.width, self.textView.frame.size.height + change * direction); } -(void)keyboardWillAppear:(NSNotification *)notification { NSLog(@"keyboard appear"); [UIView beginAnimations:nil context:NULL]; [self matchAnimationTo:[notification userInfo]]; self.textView.frame = [self adjustFrameHeightBy:[self keyboardEndingFrameHeight: [notification userInfo]] multipliedBy:-1]; [UIView commitAnimations]; } -(void)keyboardWillDisappear:(NSNotification *) notification { NSLog(@"keyboard disappear"); [UIView beginAnimations:nil context:NULL]; [self matchAnimationTo:[notification userInfo]]; self.textView.frame = [self adjustFrameHeightBy:[self keyboardEndingFrameHeight: [notification userInfo]] multipliedBy:1]; [UIView commitAnimations]; } // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end the problem is that if load the view controller from a tab bar controller the textView doesn't resize when the keyboard appear, but the SAME code works if loaded as a single view based app. I hope I was clear enough. I used the tabBar template provided by xcode no modifications.

    Read the article

< Previous Page | 4 5 6 7 8