I am getting tricked up with arrays and nested arrays.
I would like this if statement to evaluate to True if lastObject doesn'texist, or if accelerometer.x - lastObject[0] > .1
My code doesn't do this.
if (![accelerometerArray lastObject] ||
[NSNumber numberWithDouble:acceleration.x] -
[[accelerometerArray lastObject] objectAtI...
Essentially, I'm working on asynchronously downloading images and adding them to specific UITableView cells (twitter profile images using MGTwitterEngine from Matt Gemmell).
I've looked at general asynchronous download code and must admit, I'm still too much of a noob to understand it well enough to adapt it to my purposes. Instead, I'm...
In the following code, the first log statement shows a decimal as expected, but the second logs NULL. What am I doing wrong?
NSDictionary *entry = [[NSDictionary alloc] initWithObjectsAndKeys:
@"x", [NSNumber numberWithDouble:acceleration.x],
@"y", [NSNumber numberWithDouble:acceleration.y],
@"z", [NSNumber numberWithDouble:accele...
Apple's documentation for drawTextInRect seems to indicate this is possible:
"By the time this method is called, the current graphics context is already configured with the default environment and text color for drawing. In your overridden method, you can configure the current context further and then invoke super to do the actual draw...
Hi,
I have a UITabBar + UINavigationController application which often needs data from the internet. Sometimes it takes quite a while before it gets it, so I would like to show an activity indicator.
What I was trying is to add a activityView to my window in my applicationDidFinishLaunching method:
[window addSubview:tabBarController....
I've really struggled to figure out why my web service call is riddled with junk data.
I have a UITableViewController that calls the web service and also acts as the NSURLConnectionDelegate.
Here is the delegate method of interest, note the NSLog statements.
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)d...
Is there any way to access the UITableView from within a UITableViewCell? (if the cell belongs to that tableView?
...
In the new iPhone 3GS commercial, Apple shows voice control with a cool blue waveform animation. Is this visual effect for rendering the waveforms (or maybe just volumes) available as an API call or source code somewhere? (Not the voice control part, just the audio visualization)
I think you could get the sound info from AVAudioPlayer's...
Hi ,
I was trying to find an AMR Encoder for Iphone That I can integrate with my Voice recording application.
Thanks,
...
Touch may specify self to get the touch location in its own coordinate system but how do i get it from another? Say another UIview's coordinate system?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[UIView beginAnimations:@"box" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationBegins...
Hi, I'm having an issue with an iPhone app I'm working on.
It uses a separate class called Radio which streams a station in. When the title of the stream is updated, it calls back to RadioViewController with the method updateTitle:
- (void)updateTitle:(NSString *)newTitle
{
NSLog(@"update title called with title: %@", newTitle);
...
Is there any problem applying multiple transforms to a UIView and it's corresponding CALayer?
Specifically, can you "mix and match" CATransform3Ds with CGAffineTransforms without running into issues?
Also are there any problems with setting some transforms directly while animating another transform change simultaneously?
Are there any...
I have a problem. Theres my View, with 2 UIButtons and an UIImageView. When a Button is pressed down then i want to move the Image, when it isn't touched down, I want to stop the UIImage. But I have no idea how this works. Maybe you can help me. Here's my Code:
- (void)viewDidLoad
{
currentPositionx = 150.0;
currentPositiony ...
I am using the AVAudioPlayer framework, and I have several sounds that play one at a time. When a sound is finished playing, I want the application to do something. I tried to use audioPlayerDidFinishPlaying to do the action at the end of the first sound, but I couldn't use that for the second sound because I got a redefinition error. ...
Hi. I'm have a TextViewCell with a text field that that I'm using in a tableview. I need the current view controller to be the delegate. Nothing worked and in my searches I found the code below, which I implemented in my initWithNib method:
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selec...
Hi,
In my app, I have a table view that has about eight cells. There is a navigation bar at the top. When a user touches a cell, nothing happens for about 1/2 second. Then the touched cell highlights blue and immediately the new view slides into position.
The problem is that there is no feedback to the user about which cell he touched u...
This is probably an easy question but this is the first time i've encountered this. I have a modal view controller that I am getting a string from and need to add that string to an element of an array that is in another class that is calling the modal view controller. How do I pass and add that element from another class? Thanks...
...
I am curious to know if anyone has any experience comparing the load time performance of iPhone apps with views laid out in NIBs vs. views laid out entirely programmatically (i.e. instantiating UITextView, adding it to the view, instantiating UIButton, adding it to the view…).
If I want a simple app to load lightning fast, would it be b...
- (void)viewDidUnload {
self.GPSArray = nil;
self.accelerometerArray = nil;
self.headingArray = nil;
self.managedObjectContext = nil;
self.locationManager = nil;
self.pointLabel = nil;
self.accelerometerLabel= nil;
self.headingLabel= nil;
self.startStop = nil;
self.lastAccelerometerReading = nil;
self.lastGPSReading...
I've included:
#import "QuartzCore/QuartzCore.h"
but when I try to build, I get the error mentioned in the title. Is there something else I need to do to tell XCode to include the framework?
The code where I use it is:
CALayer *layer = paperView.layer;
CATransform3D rotation = CATransform3DMakeRotation(1, 0, 0, 1);
...