Search Results

Search found 418 results on 17 pages for 'ib'.

Page 11/17 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Design view disappeared from Interface Builder

    - by skywalker168
    All of a sudden, the visual design window disappeared from my Interface Builder. It is a regular UIView, has some UIImageView, UILabel, and UIButtons on it. When I open IB, I can see the document window (with File's Owner, First Responder and View in it), Library and Inspector, but the visual design window disappeared. Double click on "View" in the document window doesn't do anything. If I go to List mode, I can see all the components on the view, but just can no longer find the visual design window. All other XIB can open just fine, only this XIB lost its design window. First I thought maybe it was hidden somewhere on the screen. Tried all kinds of things, even rebooting the computer, but nothing helped. Can anyone help? Thanks in advance! By the way, I'm running SDK 3.2 Beta 3.

    Read the article

  • Set tag and hidden for objects on custom UITableViewCell

    - by Rob
    I am re-using Apple's AdvancedTableViewCells example to create a custom, fast-scrolling tableview. Specifically, I am using their CompositeSubviewBasedApplicationCell method which draws the content on the tableviewcell with drawRect Everything works, but how do you hide a label or set the tag for a label or image using their method? Doing it this way is pretty new to me (without IB), so I apologize ahead of time if it's something easy. The code that sets the cell content is: - (void)drawRect:(CGRect)rect { [_cell.animalIcon drawAtPoint:CGPointMake(5.0, 5.0)]; [_cell.animalName drawAtPoint:CGPointMake(93.0, 25.0)]; _highlighted ? [[UIColor whiteColor] set] : [[UIColor colorWithWhite:0.23 alpha:1.0] set]; [_cell.animalDescription drawAtPoint:CGPointMake(100.0, 54.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; [_cell.animalNameString drawAtPoint:CGPointMake(93.0, 5.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; }

    Read the article

  • code to play sound programmatically using a button on the iphone

    - by Brandon
    I am trying to figure out how to hook up a button to play a sound programmatically without using IB. I have the code to play the sound, but have no way of hooking the button up to play the sound? any help? here is my code that I'm using: - (void)playSound { NSString *path = [[NSBundle mainBundle] pathForResource:@"boing_1" ofType:@"wav"]; AVAudioPlayer* myAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path error:NULL]]; myAudio.delegate = self; myAudio.volume = 2.0; myAudio.numberOfLoops = 1; [myAudio play]; }

    Read the article

  • UIPickerView not displaying

    - by 4thSpace
    I have a UIPickerView on a UIView. I've implemented its protocol and delegates in the .m file: <UIPickerViewDataSource, UIPickerViewDelegate> In IB, I've connected the above to the picker, which I also have an IBoutlet for. The methods look like this: - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component { return [self.arr count]; } - (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { return @"test"; } - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { //do something } Any ideas which piece I'm missing to get the picker working?

    Read the article

  • Why my own UIViewController can't detect touch?

    - by Tattat
    I have my OwnViewController, the viewDidLoad is like this: - (void)viewDidLoad { [super viewDidLoad]; UIImage *img = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"myImg" ofType:@"png"]]; CGRect cropRect = CGRectMake(175, 0, 175, 175); CGImageRef imageRef = CGImageCreateWithImageInRect([img CGImage], cropRect); UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 175, 175)]; imageView.image = [UIImage imageWithCGImage:imageRef]; self.view = imageView; CGImageRelease(imageRef); } It works, and I have detect touches method like this: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"touchesBegan"); } But my UIView can't detect any touches. My Own UIViewController is a subclass of UIViewController. It is a little square view on the IB, why that can't detect touches? thx u.

    Read the article

  • iPad split controller that doesn't hide the left pane in portrait

    - by Tim Norman
    I am trying to implement a split view controller like UISplitViewController on the iPad, but I don't want the left pane to be hidden when the device is in portrait orientation. So I've created a UIViewController subclass for this in IB and it works fine without any sub-view controllers. Now I'm trying to wrap my head around what is required to setup and manage the two UIViewController objects for the left and right panes. In my app, they are going to both be UINavigationController with a UITableView in them. I've hit a mental road block about how to set this up and was hoping someone could point me to some sample code or give me a recommendation for architecture here...

    Read the article

  • ipad dev - in the UISplitViewController template, how is the method setDetailItem called?

    - by Brian
    I am developing an ipad app which has a UISplitViewController. (I use IB to build the interface, but I do not use the template) Both master and detail (left and right) views are navigationController. The left view subclass UITableView and the right view should push another controller if the cell on the left is selected. I don't know how to make my detail view responds to my master view. Also, in the template, the detailViewController has a id detailItem and a method setDetailItem. How are these two connected? I cannot see any connection between but setDetailItem is called when detailViewController.detailItem is being called. Thanks in advance.

    Read the article

  • Circular dependencies in StructureMap - can they be broken with property injection?

    - by Andy
    Hi, I've got the simplest kind of circular dependency in structuremap - class A relies on class B in its constructor, and class B relies on class A in its constructor. To break the dependency, I made class B take class A as a property, rather than a constructor argument, but structuremap still complains. I've seen circular dependencies broken using this method in other DI frameworks - is this a problem with Structuremap or am I doing something wrong? Edit: I should mention that class B's property is an array of class A instances, wired up like this: x.For<IB>().Singleton().Use<B>().Setter(y => y.ArrayOfA).IsTheDefault();

    Read the article

  • Making large toolbars like the iPod app

    - by andybee
    I am trying to create a toolbar programatically (rather than via IB) very similar to the toolbar featured in the iPhone app. Currently I've been experimenting with the UIToolbar class, but I'm not sure how (and if?) you can make the toolbar buttons centrally aligned and large like that in the iPod app. Additionally, regardless of size, the gradient/reflection artwork never correctly respects the size and is stuck as if the object is the default smaller size. If this cannot be done with a standard UIToolbar, I guess I need to create my own view. In this case, can the reflection/gradient be created programmatically or will it require some clever alpha tranparency Photoshopped artwork?

    Read the article

  • iphone pushviewcontroller to landscape

    - by satyam
    I've simple iphone application. it has 3 views. first view is portrait view that has 3 buttons. second view has a table view which is also a portrait. In first view, on click of a button second view is shown. on click of a cell in second view, thrid view is shown. but third view is a landscape. I'm using "pushViewController" to navigate from each view. When creating views in IB, first two views are portait and 3rd view is a landscape. In 3rd viewcontroller, i'm using following code as well: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { //return UIInterfaceOrientationIsLandscape(interfaceOrientation); return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft)); } How can I show first two views in portrait and third view in landscape.

    Read the article

  • touchesBegan and other touch events not getting detected in UINavigationController

    - by SaltyNuts
    In short, I want to detect a touch on the navigation controller titlebar, but having trouble actually catching any touches at all! Everything is done without IB, if that makes a difference. My app delegate's .m file contains: MyViewController *viewController = [[MyViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [window addSubview:navigationController.view]; There are a few other subviews added to this window in a way that overlays navigationController leaving only the navigation bar visible. MyViewController is a subclass of UIViewController and its .m file contains: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"ended\n"); } } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"began\n"); } } I also tried putting these functions directly into app delegate's .m file, but the console remains blank. What am I doing wrong?

    Read the article

  • set Image to Button

    - by Ivan
    Hello all, Could somebody help me a little bit with my issue below? When I call the myFunction, images which I want to set to buttons appear after 2 sec simultaneously, not one by one with delay of 0.5 sec. More info: generatedNumbers is array with four elements of NSNumber (4,1,3,2) buttons are set in UIView via IB and are tagged (1,2,3,4) -(IBAction) myFunction:(id) sender { int i, value; for (i = 0; i<[generatedNumbers count]; i++) { value = [[generatedNumbers objectAtIndex:i] intValue]; UIButton *button = (UIButton *)[self.view viewWithTag:i+1]; UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"%d.png",value]]; [button setImage:img forState:UIControlStateNormal]; [img release]; usleep(500000); } }

    Read the article

  • UIScrollView in a TabBar controlled navigation - IPhone

    - by user362722
    I have a TabBarControlled view navigation and i want to display a UIScrollView in one of the Tabs, but whenever i click on this tab the error-code: ...this class is not key value coding-compliant for the key... appears. My code: Code: #import <UIKit/UIKit.h> @interface BillViewController : UIViewController <UIScrollViewDelegate> { IBOutlet UIScrollView *olta; } @property (nonatomic,retain) IBOutlet UIScrollView *olta; @end My code has a IBOutlet UIScrollView and it is connected to the IB. My class also implements the desired protocol and the delegate is connected to the BillViewController-class. thanks

    Read the article

  • UINavigationController (drawRect:)

    - by ludo
    Hi, I created an application with a TabBarController, 4 TabBarItems and every TabBarItem have is own NavigationController file (everything created in IB). I'm using the drawRect function to design my navigationBar: @implementation UINavigationBar (customImage) -(void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed:@"MyImage.png"]; [image drawInRect:CGRectMake(0,0, self.frame.size.width,self.frame.size.height)]; } @end The problem is that the NavigationBar change for every ViewController inside my app, what I want is only draw the NavigationBar for one TabBarItem only and use the default navigationBar for other controller. How to do that? Thanks,

    Read the article

  • Interface Builder - XCode link broken with iPad-converted xib

    - by Kenneth Ballenegger
    In porting my app to a universal iPhone / iPad app, the xibs I created by using Interface Builder's "Create iPad Version" will not link to the project properly: They don't pick up on classes and images from the project file. IB tells me that "there is no xcode project associated with this document" with a gray light in the status bar. Yet the xib is in the project, was launched by double-clicking in xcode, and both are open. The old xibs work fine though. I don't understand what could be causing this. So, my question is, how do I restore the link?

    Read the article

  • SingleTap on UIScrollView

    - by ludo
    Hi, I see many post dealing with the UIScrollView like in the PhotoApp, but I don't really understand them, thats why I want to reopen a post about it and have a simple solution. What I want is to create (without IB) a simple UIViewController who will contain a UIScrollView (inside my scrollView there will be image and the scrollView will be set to pagingEnable to YES of course). I want to be able with a simple touch of the screen to display the navigationController.navigationBar inside my UIViewController and with another touch not displaying it of course. Can anyone show me how to implement that? thanks,

    Read the article

  • UIToolbar on top of navigation bar - black opaque doesn't blend

    - by z s
    I am trying to put a UIToolbar on the right side of a UINavigationBar, to add multiple buttons on that side. When I leave the tint of both to Default, they blend fine. But when I set both of them to BlackOpaque, they don't blend very well. I can see the edge of where the toolbar starts very clearly. I've tried this through IB and code. Same result in both cases. Anyone run into this before, or can offer some suggestions?

    Read the article

  • Variable height UIViews and labels

    - by Bob Spryn
    Ok so I'm not in a table cell at this point. (I've seen a lot of threads regarding the height of cells.) I have a detail view with a title and description at the top of the view, followed by a tableView below it. If the description is going to vary in length, how do I get the tableView to adjust with it accordingly so it always starts directly below it? I see apple doing this in the app store application. If you look at an application description (as if you were going to buy it), they have an application description, and wherever that ends a scrolling pane of screenshots follow. How do they do the varying height on the text description like that? Are they doing this all programmatically or can I use the layout controls in IB to do the same thing?

    Read the article

  • Puzzled with nib files...

    - by Michael
    I know nib files are serialized objects and they have owner, outlets to make connections. Using XCode Navigation window template I created application, which in its order created 2 nib files - MainWindow and SecondView. I can't understand how MainWindow is referring to SecondView, there is no connection between those two as far as I can see. SecondView's owner is UIViewController and in MainWindow there is a navigation tab which is also UIViewController. But how they are connected in IB I can't understand... Also I don't understand who is instanciating MainWindow's owner object and where that object is being kept, where is the variable which is UIApplication myApp = [[UIApplication alloc] init]. If I create 10 nib files with UIViewController owner, who will trigger their deserialization? If some class is nib file's owner, what is the essential responsibilities of that class? Is it deserializing nib file into memory? Sorry for unorganized questions, I've been reading numerous articles and docs about nib files, but it is still confusing.

    Read the article

  • How to reference THE UIWindow from sub UIViewControllers?

    - by maralbjo
    I am trying to add another subview programmatically based on some event (user taps a button, for instance). My problem is that I am having problems referencing the (one and only) instance of UIWindow. I reach it from my appDelegate, because the MainWindow.xib and the appDelegate have been wired up. But I cannot reach the UIWIndow from anywhere else (I cannot draw that connection in IB, can I?) What techniwue is preferred to get a reference to (the one and only) UIWindow? ...so that I in turn can use the following code from my various UIViewControllers: [myOneAndOnlyWindow addSubview:oneOfManyViews.view]; [myOneAndOnlyWindow makeKeyAndVisible];

    Read the article

  • Why is this leaking memory? UIImage `cellForRowAtIndexPath:`

    - by Emil
    Hey. Instruments' Leaks tells me that this UIImage is leaking: UIImage *image = [[UIImage alloc] initWithContentsOfFile:[imagesPath stringByAppendingPathComponent:[NSString stringWithFormat:@"/%@.png", [postsArrayID objectAtIndex:indexPath.row]]]]; // If image contains anything, set cellImage to image. If image is empty, try one more time or use noImage.png, set in IB if (image != nil){ // If image != nil, set cellImage to that image cell.cellImage.image = image; } image = nil; [image release]; (class cell (custom table view cell) also releases cellImage in dealloc method). I haven't got a clue of why it's leaking, but it certainly is. The images gets loaded multiple times in a cellForRowAtIndexPath:-method. The first three cells' image does not leak (130px high, all the space avaliable). Leaks gives me no other info than that a UIImage allocated here in the code leaks. Can you help me figure it out? Thanks :)

    Read the article

  • UIScrollView: Is 806k Image too much too handle? (Crash, out of memory)?

    - by Jordan
    I'm loading a 2400x1845 png image into a scroll view. The program crashes out of memory, is there a better way to handle this? mapScrollView is an UIScrollView in IB, along with a couple of UIButtons. -(void)loadMapWithName:(NSString *)mapName { NSString* bundlePath = [[NSBundle mainBundle] bundlePath]; UIImage *image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/path/%@", bundlePath, [maps objectForKey:mapName]]]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; CGSize imgSize = image.size; mapScrollView.contentSize = imgSize; [mapScrollView addSubview:imageView]; [imageView release]; [self.view addSubview:mapScrollView]; }

    Read the article

  • How to bind a control to a singleton in Cocoa?

    - by SphereCat1
    I have a singleton in my FTP app designed to store all of the types of servers that the app can handle, such as FTP or Amazon S3. These types are plugins which are located in the app bundle. Their path is located by applicationWillFinishLoading: and sent to the addServerType: method inside the singleton to be loaded and stored in an NSMutableDictionary. My question is this: How do I bind an NSDictionaryController to the dictionary inside the singleton instance? Can it be done in IB, or do I have to do it in code? I need to be able to display the dictionary's keys in an NSPopupButton so the user can select a server type. Thanks in advance! SphereCat1

    Read the article

  • iPhone: Setting Navigation Bar Title

    - by Arthur Skirvin
    Hey all. I'm still pretty new to iPhone development, and I'm having a bit of trouble figuring out how to change the title of my Navigation Bar. On another question on this site somebody recommended using : viewController.title = @"title text"; but that isn't working for me...Do I need to add a UINavigationController to accomplish this? Or maybe just an outlet from my UIViewController subclass? If it helps, I defined the navigation bar in IB and I'm trying to set its title in my UIViewController subclass. This is another one of those simple things that gives me a headache. Putting self.title = @"title text"; in viewDidLoad and initWithNibName didn't work either. Anybody know what's happening and how to get it happening right? Thanks!

    Read the article

  • iphone instance / class method issue

    - by user290031
    Hey All, Okay, so I have a viewController method that has some elements created with interface builder and some I coded myself. I created a view in the IB...lets call it viewOne. I created a loop that creates buttons (through code) and places them on a separate view (viewTwo). This is done in a class method. However, I want the view I made to be opened everytime one of the buttons is clicked. So I did: [button addTarget:self action:@selector(woogoo:) forControlEvents:UIControlEventTouchUpInside]; The woogoo class does the following: +(void) woogoo:(id)sender { //back button [self.view addSubview:viewOne] } However, the program crashes when a button is clicked. I did try making woogoo an instance method but it also crashes in this case too. All I want to do is show viewOne when a button is clicked. Any ideas what I can do?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17  | Next Page >