I have an IBOutlet to an UIImageView, but when I look at the UIImageView doc, I can't see any hint about how to programmatically change it. Do I have to fetch an UIImage object from that UIImageView?
...
How can I detect lock/unlock events on the i-phone? Assuming it's only possible for jailbroken devices, can you poin me to the correct api?
...
I have this code:
- (void)viewDidLoad {
[super viewDidLoad];
landscape.image = [UIImage imageNamed:@"tenerife1.png"];
}
First, I created an UIImageView with IBOutlet. landscape is pointing to that UIImageView. In InterfaceBuilder i told to show an specific image in that UIImageView. It never changes. I always see the image I specifie...
- (void)viewDidLoad {
[super viewDidLoad];
landscape.image = [UIImage imageNamed:@"tenerife1.png"];
}
I assign that new UIImage to the image property of an UIImageView object. I am not sure if that would result in an memory leak?
...
I want to change an image of an UIImageView from the applicationDidFinishLaunching method of the app delegate class. But I am afraid that this class doesnt know much about the controller outlet. What must I do in this case?
...
If I declare a pointer variable in this fashion:
NSString *foo;
And then somewhere later in my code do something such as:
foo = @"bar";
Is that ultimately taking my NSString, creating a new copy in memory with an additional string, then deleting my initial string? Would foo be better off as an NSMutableString?
...
I've been reading up on some of the iPhone audio services in considering an audio recording/playback app, but ideally I'd like to be able to use the other end of a phone connection as inputs and outputs, i.e. remote speaker and remote microphone via cellular (or VoIP, but for now cellular's the question), when it's on, as input and outpu...
I have placed my images in XCode Groups&Files, in this location:
Ressources/img/
But now I look at the UICatalog XCode project from apple, and they put all images here:
images/
It seems like Interface Builder has no problem finding them, but as soon as I try that programmatically, all attempts fail.
...
I found out this:
applicationDidFinishLaunching (an delegate method of the UIApplicationDelegate Protocol) seems to be called BEFORE my views from the nib file are loaded completely. So I tried all the day to change an image of an UIImageView right after my app launched in the iPhone simulator, but nothing happened.
Then I wrote a litt...
I'm developing for the iPhone and am trying to get an initial timeStamp to sync my audioQueues.
I'm using AudioQueueDeviceGetCurrentTime for this. According to the documentation this function gives back a valid mHostTime whether the queue/device is running or not. But when I try this I get back a kAudioHardwareNotRunningError (19370105...
In my app, i currently have all my code separated into a static library, to make it easier to set up the xcode project targets for the actual app and for unit tests for my code. The problem with this is that i want to put most of my xib files in the static library as well, but it seems that when i run my app and try to reference the xib...
I am having trouble determining the tag of the view I am touching.
I have a scrollview and subclass-ed it inorder to capture touch down events (I have pictures on the subview). However, I need to determine which picture I touched down.
I want to determine that .tag of the subview, but I am getting random results (mostly tag 0). Whats t...
I'm trying to populate a UITableview with an array of cells. I usually do this from the viewDidLoad method but this time I want to populate the array based on location. Below is the first line of my interface:
@interface RootViewController : UITableViewController
{
In the implementation file the viewDidLoad method looks like this:
...
Take the following example..
A single tabBarController toggles between two views, each handled by their own view controller (lets say viewController1, viewController2).
I have a class called Widget that has the property 'name'.
So i have code in view1 that will read the contents of a textfield and set the 'name' property of my widg...
I have a UIViewController that is pushed onto a UINavigationController and is currently displayed. When I go to start some asynchronous task inside the view controller, I can set hidesBackButton on self.navigationItem to YES, and the back button is hidden correctly.
As soon as the task is finished, and I set hidesBackButton back to NO (...
I'm referencing another project's target static library. I successfully followed instructions from this site: http://tinyurl.com/cleuhw. Below is the project using a class named FileIO from the library. I create a FileIO object (fileObj) and assign a string to its name property. Then I get a __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ ...
In regards to my a little to late discovery that static libraries (obviously) can't have instance members, http://stackoverflow.com/questions/708155/how-to-reference-property-on-library/708263#708263, is there a way to create a shared library that contains both instance and static members?
On way that probably works is to create a class...
Can anyone tell me the equivalent of glDrawPixels() in OpenGL ES 1.1?
...
I am looking for good explanations out there. I have a 1000 pages book about objective-c, but unfortunately the part about memory management, retain counting, is described pretty bad and hard to understand.
...
I have defined an UIImageView in my nib. After the app launches, I display an image in that UIImageView. Maybe I am on the wrong way, but what I want to do is the following:
The image which I load into the view is bigger than the view itself. I want that it is displayed in original size with hidden overlay. Then I want to slowly move th...