As part of a current project I've been asked to display a candle onscreen. Users should be able to tilt the device to tilt the flame, and perform an action (eg. tap) to blow out the flame. I'm at a real loss on how to achieve this. Some ideas I've had:
purchase a movie of a candle from a stock video site. This won't let me tilt or blow...
I've got a UITableView that's loading a bunch of RSS feeds, and the favicon for each feed is shown in the table cell. It works well most of the time, but sometimes the image does not appear. Looking through the debugger, the images that don't appear have the NAMED and CACHED flags set to TRUE, with all the other flags set to FALSE. Image...
I'd like to re-create something similar to Instagram's tab bar for iPhone, which has a "custom", bigger tabbar item in the middle of the tabbar (see http://cdn.venturebeat.com/wp-content/uploads/2010/10/instagram-screenshot.jpg)
I can think of several approaches, but was wondering if anybody has suggestions on an easy way to accomplish ...
I am new to iPhone application development and currently working on a simple paint application for iPhone. I use GLPaint source code to start with. I tried to change the brush size using the following ways.
I created a UIViewController class and linked it to GLPaint.PaintingView and added different buttons to indicate different brush s...
I'm trying to position the navigation bar below the top of the screen.
I've tried the following in viewWillAppear:
self.navigationController.view.frame = CGRectMake(0.0, 54.0, 320.0, 426.0);
self.navigationController.navigationBar.frame = CGRectMake(0.0, 0.0, 320.0, 44.0);
The problem is it only seems to work the very first time the v...
If you have 4 tabs, what is the best way to inform one of the view controllers that it has been "deselected". In other words, that another tab was selected?
I can't just use viewDidDisappear, because that may happen anyway. Is there another way for a view controller to know that it is no longer the active tab?
The TabBar delegate (didS...
Any Xcode project I create from scratch always contain either a sym link to the com.apple.AddressBook.plist file or to com.apple.PeoplePicker.plist in the folder:
Application Support/iPhone
Simulator/(SDK
Version)/Applications/(GUID)/Library/Preferences
Anyone know why this is and how do I go about the app never creating this?
...
For some reason today every iOS app that I try to debug on my device crashes straight away(the loading screen will show for a second) with exit code 45 when I build and run from xCode. This was working fine when I went to bed last night. Now it happens with every single apps even something like a hello world one.
The run fine on the simu...
Trying to settle a debate with a client. I didnt localize the strings and images in the application and it didnt come up during the 3 week define and discover. They seem to think its a basic best practice and that it should have been done by default. I disagree, especially if there are no planned languages otw.
Seems like you would leav...
The context:
I am working on an app that maintains a list of contacts along with their record IDs for it's own reference.
When the user needs to change the number associated with a specific contact within the app, I am trying to display the ABPersonViewController so the user can choose the new number from the contact in AB.
The probl...
I am trying to write unit tests for a class that manages a UIImagePickerController. Yet, I still would like to link against UIKit to pull in other symbols I don't care about stubbing.
Usually, I use OCMock for mocking out instance methods. With UIImagePickerController I'm interested in mocking out class methods which OCMock can't do. I'...
Not quite sure how to phrase this, but should I release a variable in this situtation:
NSString *string = @"HELLO WORLD";
NSArray *array = [NSArray arrayWithObject:string];
NSString *shouldIReleaseThis = [array objectAtIndex:0];
NSLog(@"%@", shouldIReleaseThis);
//???? [shouldIReleaseThis release] ??????
//Do stuff with array
Shou...
I have an UIImageView and a few buttons defined in interface builder. I want to display an image with the buttons on top of it. I add an image to the UIImageView programatically but it covers up the buttons. I tried using sendSubviewToBack and the image disappeared completely. Here's my code
UIImageView *imageView = [[UIImageView alloc]...
I have a universal binary iPhone/iPad app. The app icon appears correctly when I install the app on an iPhone4 and an iPad. However, when installed on an iPhone 3G, the icon is blank (gray). I've tried everything I can think of that might fix this issue and would appreciate suggestions. I followed the Apple icon guidelines for universal ...
I have a simple UI picker view in an iOS app (iPhone) and I'm looking to pre-populate it with a range of numbers on launch. What would be the most pragmatic/quickest/optimized way to populate it? I'm new to iOS development, so I'm just starting to test the waters. The documentation is pretty decent but I'd like to get some insight fro...
I'm diving into iOS development and I have a quick noob question about Core Data. As I understand it, any data that in an app's Documents folder is backed up to iTunes when the user syncs their device. Does that mean if my core data sqlite db is in the Documents folder, then that data will be synced between multiple devices with the same...
Hi all,
Further to this question here, I'm really interested in creating my own UITabBar, and 'rolling my own'. Im really curious as to how this is done, especially in an app such as the Twitter app.
How can I do this? Can anyone point to any good resources on how to subclass this?
Should I do it programmatically, or in a XIB?
Edit: I...
Hi All,
In the MVC design pattern, which class file (appdelegate, viewcontroller etc) is best suited for these IBOutlet/IBAction scenarios?:
IBAction (e.g. Show Menu) to be triggered by UIButton press event?
IBOutlet to manipulate a UI elements properties (e.g. Hide Menu)?
A poke around Apple's sample code seems to show IBOutlets ex...
Hi, i has the following code which suppose to convert file to data but the problem is the byte size is not the size after the conversion can someone help me on this one? i'm suppose to send the NSdata using NSStream to a server.
NSString *file = [[NSString alloc] initWithContentsOfFile:filepath;
NSLog(@"length = %d",[file length]); //...
Hello everyone,
Is there any way I can convert the value of a [NSData bytes] to a float so that I can add it to a progress bar?
Thanks,
Kevin
...