UIAlertSheet's constructor takes an otherButtonTitles parameter as a varg list. I'd like to specify the other button titles from an NSArray instead. Is this possible?
i.e. I have to do this:
id alert = [[UIActionSheet alloc] initWithTitle: titleString
delegate: self
ca...
I am running through an iPhone development tutorial and I have a weird bug that I am investigating using the debugger. I have the following code that checks to see if a object is in bounds. I am trying to see what the value of ball.center.x is at a certain point, but because center is a property accessor selector, I don't get the value...
I've got a pretty big A* pathfinding function that gets called frequently and has to be put in another thread because otherwise it will make my game stutter. I come from a Java background, and recently read a discussion about the speed of HashMap's (essentially the equivalent of NSDictionary) and the different implementations you can use...
i am trying to launch a view from a button. When I do it causes a memory link but I can see why.
CamViewController *dvController = [[CamViewController alloc] initWithNibName:@"Cam_View" bundle:[NSBundle mainBundle]];
dvController.camType = 1;
[self.navigationController pushViewController:dvController animated:YES];
[dvController relea...
Hello all,
I am using a UITableViewController which uploads a table. I have a Nib File with UITableView in it.Now I want to set the background of the tableView either from interface builder or from the TableViewController to an image.
How to do that.
OK so I created an UIImage in my controller. Now when I add where do I need to add i...
I'm trying to create an array of strings that can be randomized and limited to a certain x number of strings.
If the array could be randomized I could pick the first x strings and that would work fine.
I'm trying to use code like this currently
NSString *statements[9];
statements[0] = @"hello";
This seems to work but the array seems...
I have an app, which has a top navigation bar and a bottom tab bar.
One of the tabs displays a table's XIB file with my custom controller.
This UITableView is created by a MyTableViewController class.
I have a problem with the table's size. The table's frame size is bad (it's the fullscreen iphone size, without the status/tab/navigat...
I'm working through an iPhone tutorial (link text and it has me put in some code (a few times throughout the various tutorials) but it doesn't explain it at all.
In this code:
todoAppDelegate *appDelegate = (todoAppDelegate *)[[UIApplication sharedApplication] delegate];
What exactly is an appDelegate? What does the "delegate" at the...
Hello all,
I have a fixed size UITextView say width and height of 150,150.
The purpose is to display the thought of the day. Please note the size need to remain constant and I cant change it.
Now The length of the thought string varies with respect to thought. What I want to do is change the size of font of the text to make sure it do...
Setup: I have a UITextView inside a UITableViewCell's contentView. I want it to take up the full size of the cell. I create the text view like so:
UITextView *textView = [[[UITextView alloc] initWithFrame:CGRectMake(0,0,268,43)] autorelease];
textView.backgroundColor = [UIColor redColor];
textView.layer.cornerRadius = 10;
textView.au...
How can I dynamically create a view controller with a NIB file?
Thanks.
...
Hello all,
I am using ad hoc distribution for my iPhone app. It works very well. The only problem is when I update my app or create a new binary and want to install this new version on device, I need to delete the old version. Like although I drag and drop the new version in iTunes application, it does not over write the previous versio...
Hi,
I'm developing an iPhone application that have a TabBarController with two tabs.
Each tab contains a UIWebView that loads a web page from my web site.
I want to add a view that will function as a welcome screen that doesn't show the TabBarController itself (full screen view) and indicates that the application is being loaded.
Afte...
Hi,
I'm playing multiple wav files (I tried using caf but same thing happen) with AVAudioPlayer. All the files are less than 2 sec, and 16 bit sound - file size is ~40kb.
I found it makes small noise (it's hard to describe, but a small sound like 'dub') in two cases:
1) when a play is paused or stopped while playing.
2) when a play fin...
I am trying to use a customized keyboard in my application, but I am hitting problems when trying to restrict it to one particular UITextField.
I based my code on this Xcode project (originally found on this blog). That code adds a custom UIButton (representing a 'decimal point') into the UIKeyboardTypeNumberPad keyboard view. It does...
New to Quartz and I am curious on the drawing speeds of simple shapes, gradients, and shadows; specifically comparing Quartz drawing functions to Quartz image drawing on the iPhone.
Say that I need to draw a filled, stroked, and shadowed rectangle. I'm assuming that importing a pre-baked rect as a PNG and drawing it using drawInRect: o...
We have place a button on a view. When we press it, nothing happens. It should be firing a function we have defined. This is what we have done.
We have used interface builder to map the touch up inside event to our function_A. We verify this by right clicking on our view controller and the mapping is there under the received actions sec...
One thing I really don't like about Objective-C is that it's very difficult to find out what's going on under the hood.
The latest problem this has caused me is a random exception that occurs in random places in my code and breaks everything - it's the one listed above, about concurrency problems with NSArray.
The thing is that I never...
Suppose I have a scroll view in a view & a scroll view's size is 320 width, 2000 height.
When user scrolls & decelerating stops,
I want to know where a scroll view has stopped?
i.e. at 300px or 400px or at 600px.
Thanks in advance.
...
Is it possible to code this sequence of events once an iPhone app has been launched?
User launches application.
AppDelegate.m checks if data is present in internal database.
If yes, MainWindow.xib loads.
If no, AnotherViewController.xib loads.
I've only seen app examples that load the MainWindow.xib without conditions.
If it is possib...