Hi I wrote this
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
in this method
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
but I can only see it when I select that cell otherwise it's not visible.and it work perfectly when background is white.
I am sure t...
I have an application that uses the accelerometer. Sometimes, the application will launch without the accelerometer data updating. Relaunching the app, sometimes the problem persist, sometimes it doesn't. And even weirder, sometimes I can try 10 times and everything works as expected. Is this a bug, or maybe something I am missing. Debug...
In my view controller's -viewDidLoad method, I call [myTextField becomeFirstResponder]; This works like a charm, opens the keyboard and myTextField gets focus.
I have a button with a target action (the action is in the same controller) that checks [myTextField isFirstReponder] - but it always returns false (er, NO in Cocoa terms ;)).
...
So yeah, I'm a Java guy in this crazy iPhone world. When it comes to memory management I stiill don't have a very good idea of what I'm doing.
I have an app that uses a navigation controller, and when it's time to go on to the next view I have code that looks like this:
UIViewController *myController = [[MyViewController alloc] initWi...
I am developing an iPhone application that persists data to a SQLite3 database.
For each row I persist I wish to include a 'created date' and a 'last modified date'
My question is what is the recommend approach for storing this information in a table?
The properties are represented as NSDate in my application but I am unsure how to ...
Hi all,
I've implemented a tap-and-hold handler using an NSTimer that I first set in the TouchesBegan overload.
However, what I actually want is for an action to be continuously performed in quick-fire succession while the touch is being held. So, on timer expiry I call a handler to do the work, which then sets another timer and the cy...
I have an app where I create many uiviews and add them to the self.view of the UIViewController. My app is running really slowly. I am releasing all of my objects and have no memory leaks (I ran the performance tool). Can anyone tell me what could be making my app so slow? (code is below)
[EDIT] The array has around 30 items. [/EndEdit]...
I have an animation that I'm displaying using a UIImageView:
imageView.animationImages = myImages;
imageView.animationDuration = 3;
[imageView startAnimating];
I know I can stop it using stopAnimating, but what I want is to be able to pause it. The reason is that when you call stop, none of your animation images are displayed, whereas...
General Description:
To start with what works, I have a UITableView which has been placed onto an Xcode-generated view using Interface Builder. The view's File Owner is set to an Xcode-generated subclass of UIViewController. To this subclass I have added working implementations of numberOfSectionsInTableView: tableView:numberOfRowsInS...
When I try to allocate a Texture2D the app just crashes. I've stepped through the code where the crash occurs... all I can tell is "EXC BAD ACCESS". Here is the line in the app delegate that makes it crash:
_textures[myTex] = [[Texture2D alloc] initWithImage: [UIImage imageNamed:@"sometex.png"]];
sometex.png has been added to the re...
My app crashes when I do the following in the applicationDidFinishLaunching event in the app delegate:
_textures[mytex] = [[Texture2D alloc] initWithImage: [UIImage imageNamed:@"a.png"]];
However when I replace @"a.png" with
@"/Users/MyUserName/Desktop/MyProjectFolder/a.png"
everything works fine. I've experimented with the relati...
I need to use NSImage which appears need to be imported from <AppKit/AppKit.h>. I have included the AppKit framework, and I do see AppKit.h there. But I am still getting compilation error saying <AppKit/AppKit.h> not found.
What I might missed ?
Thanks.
...
I'm writing an iPhone app with a table view inside a tab view. In my UITableViewController, I implemented -tableView:didSelectRowAtIndexPath:, but when I select a row at runtime, the method isn't being called. The table view is being populated though, so I know that other tableView methods in my controller are being called.
Does anyon...
I have the following code to create a UIPickerView:
pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 416.0f - height, 320.0f, height)];
pickerView.delegate = self;
pickerView.showsSelectionIndicator = YES;
[pickerView setSoundsEnabled:YES];
I would like to change the component widths and change the text size in each ...
I am using UIImagePickerController to take photo, there are two steps involved, "Take photo" and "Use photo". Is there any way to override the behavior, merge these two action in one? Say "Take and use photo".
Thanks.
...
I am trying to load UIImage object from NSData, and the sample code was to NSImage, I guess they should be the same. But just now loading the image, I am wondering what's the best to troubleshoot the UIImage loading NSData issue.
Thanks.
...
I'm trying to play a sound file from an iPhone program.
Here's the code:
NSString *path = [[NSBundle mainBundle] pathForResource:@"play" ofType:@"caf"];
NSFileHandle *bodyf = [NSFileHandle fileHandleForReadingAtPath:path];
NSData *body = [bodyf availableData];
NSLog( @"length of play.caf %d",[body length] );
NSURL *url = [NSURL fileURL...
In either a Windows or Mac OS X terminal if you type...
nslookup -type=SRV _xmpp-server._tcp.gmail.com
... (for example) you will receive a bunch of SRV records relating to different google chat servers..
Does anyone have any experience in this area and possibly know how to service this information (hostname, port, weight, priority) ...
A lot of iPhone apps use a blue badge to indicate the number of items in the subviews, such as the Mail client:
Are there any standards way (or even an API) do this?
UPDATE: I have created a class called BlueBadge to do this. It is available at http://github.com/leonho/iphone-libs/tree/master
...
I'm currently using a UIImageView with an array of images to create a small looping animation sequence with about 20 images in there (at 320x480). Whilst this works okay for 20 - 30 images, any more and the app quits on the iphone. There is nothing else in my test app at the moment so I know it's just down to the animationImages sequence...