interface-builder

AVAudioPlayerdelegate

Hello, I receive this error for this code- warning: class 'BeatMaker' does not implement the 'AVAudioPlayerDelegate' protocol -(IBAction)playBeat3 { NSString *path = [[NSBundle mainBundle] pathForResource:@"beat3" ofType:@"mp3"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] ...

iPhone XIB quickly grows to huge size

I used to have a very small/simple XIB file. Something has caused it to quickly grow to over 500k. The only graphics in it are 3 small PNG files (about 4k each). Here's some of the XIB. Any idea on what is causing this size increase? <string key="NSFrame">{{0, 44}, {320, 416}}</string> <reference key="NSSup...

How do I change the text but keep the formatting

How do I change the text of a label but keep the formatting as in interface builder? //This line changes the formatting and makes the text very small lHolidayNightCount.text = [NSString stringWithFormat:@"%f", sHolidayDuration.value]; ...

New to Objective-C --> Quick question(s)

So I'm trying to make the horrible leap from VB.NET to objective-C. My only curly-brace experience is a little ActionScript 3... I'm having a hard time grasping the use of the * character. Question 1: The tutorial I'm using has these two lines next to each other.. IBOutlet UIPickerView *pickerView; NSArray* myArray; It's my unders...

NSButton in NSToolbarItem (setView) when clicked in "Text only" forces mode to "Icon and Label"

I am trying to recreate the nice textured buttons like Finder, Safari and Transmission have in their toolbar. First I started by just dragging in a "Texture button" in the IB and such. All works well except for when a user sets the toolbar to "Text only" mode. When he then clicks the button the toolbar will enable "Icon and Label" on it...

How to disable select functionality in UITextView?

I want to create a text display area (either UILabel or UITextView) in my iPhone app which (1) allows scrolling and (2) does not allow selection. I have tried the following techniques unsuccessfully: Basic UILabel: Didn't allow scrolling, and clipped text to the bottom of UILabel space on screen. Giant UILabel within a UIScrollView: th...

Fonts not displaying in Interface Builder

For some reason many of the fonts will not display in Interface Builder when I am designing my iPad app. Unfortunately my iPad is yet to be delivered so I cannot tell if this is going to be a problem in the long run, but it certainly maintains through to the simulator. The fonts in question are listed on various websites as being compat...

"Best" Way to Implement a UISegmentedControl underneath a UINavigationBar

Hi all, I am working on an app that uses a navigation controller to control the views. In one part of my app, I want to have a UIView with a UISegmentedControl just underneath the navigation that will "filter" the UITableView. Essentially: ======================================== | < Back) Title Goes Here | <- navigation...

Using loadNibNamed leaves a memory leak

For some reason, using loadNibNamed: is leaving me with a memory leak. Let's say I have the interfaces: @interface Step : UIViewController { IBOutlet UIView *keyPadPopupView; } @property (nonatomic, assign) IBOutlet UIView *keyPadPopupView; In Step: @synthesize keyPadPopupView; - (id)initWithNibName:(NSString *)nibNameOrNil bundl...

Interface Builder: Tool Kit (BWtoolkit) Installation

I tried installing BWtoolkit in my interface builder following the instructions on the BWtoolkit site. I downloaded the toolkit and installed it by clicking on BWToolkit.ibplugin. I can see the BWtoolkit when i go to Interface Builder>Preferences>Plug-ins but none of the objects are appearing in the library window. The only folders ...

Unknown class in Interface Builder file.

I created a fairly simple iPhone app. Then figured I'd create an iPad version (Universal) of the app. Tried using the 'upgrade' option and that didn't work-out. So I created a separate universal app and copied the xib files into my project. That didn't work out either, so I deleted the xib files (and their associated .m & .h files. ...

Setting font of UILabel with Interface Builder comes out Helvetica

Hello, I'm having a problem setting the font for UILabels and UITextViews with Interface Builder. I'm trying to set the font to Gill Sans. If I set it programmatically it works fine, like this: myLabel.font = [UIFont fontWithName:@"Gill Sans" size:24.0]; But if I try setting it with Interface Builder, I get the same behaviour desc...

How do I display my info view in my iApp

I am writing my first iPhone App, a test case before I write my life saving app to help me learn how things are done on this platform. So I used the standard ModelViewController widget and created my app. I put my UI on the default view and added all the glue code in the ViewController.m/.h files: event handlers, IBOutlet mappings to c...

Why is "view" an outlet on UIViewController?

I'm just starting out with iOS programming. I'm wondering why view is an outlet on UIViewController. When I look at UIViewController.h, the keyword IBOutlet isn't present. I thought all outlets available in Interface Builder had to be declared as IBOutlet. Am I missing something here? ...

How to change font color of individual characters in a UIPickerView row?

I have an app which shows text in a UIPickerView based on a search. I want to highlight specific letters in the string that are there as a result of a wildcard character. For example, if I searched for "CA?", one of the rows will show "CAT" and I want only the letter "T" to be in the color blue. Any ideas? The user gets immediate fee...

Interface Builder Bug?

I have a cocoa program that I have I am writing on a 10.6 system, but targeting to 10.5. On the 10.6 system, it works fine. However, when I run it on the 10.5 machine, I get: The sender of menu item actions is now the NSMenuItem, not an NSMatrix. A menu item action method appears to be trying to send the NSMatrix method 'acc...

Hillegass: Cocoa Prog 3rd Ed: Ch. 33 on OpenGL: Where's the Matrix?

I'm using XCode 3.1.4, on OSX 10.5, targeting same. In Ch. 33 we're asked to drag an NSOpenGLView and an NSSlider onto the IB library, and then do Layout -> Embed Objects in -> Matrix. Except the Matrix option is always disabled. What do I have to do to enable the matrix? ...

Content border for NSWindow in xcode 4

In interface builder for xcode 3.2 NSWindow had property content border to set something like a 'footer' for the app, does anyone know where is it in xcode 4 interface builder? Thanks for help. ...

How do I set a view programatically for my tabBarController?

I have a tabBarController xib. I've set the first item's class to a view controller I made (.h and .m files, no .xib). When I try to push the tabBarController, I get a warning saying the tabBarController "view outlet was not set". I'm not sure how to set the view outlet, since I am loading from another view. I'm expecting the default gr...

How to change startup window locations in Interface Builder

Every time I open a .xib file the View window is partly covered by the Library panel, so I have to drag it to a different location. Is there a way to setup the locations of where windows appear when IB starts? ...