iphone

Crash on creating new persistence store (jailbroken iPhone device 4.1)

Hi there, Whenever I deploy "CoreDataBooks" Apple iOS sample application to my jailbroken device with self signed certificate and run it - it crashes at line where core-data persistent store is added to persistent store coordinator: line 178: if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:n...

Rotating/moving objects on a UIView

I need to rotate and move objects on a UIView when the orientation changes. To that end I have the following in willRotateToInterfaceOrientation if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) { [self repositionObjectAfterRotation:scrollView x:0 y:100 width:480 height:150]; [self repositionObjectAfterRotation:page...

drawLayer:inContext is not called

I have my very own minimal view class with this: - (void) awakeFromNib { NSLog(@"awakeFromNib!"); [self.layer setDelegate:self]; [self.layer setFrame:CGRectMake(30, 30, 250, 250)]; self.layer.masksToBounds = YES; self.layer.cornerRadius = 5.0; self.layer.backgroundColor = [[UIColor redColor] CGColor]; [self s...

How to Programatically access ipad "Video" folder

Hello, I am using the iPad, and I have videos/movies stored in the "Videos" folder on the iPad. Note: I'm not try to access videos saved in the Photos Section, I can already access videos saved in here by using; UIImagePickerController* picker = [[UIImagePickerController alloc] init]; picker.delegate = self; [picker setMediaTypes:[...

IPhone remember where you've been

Hi, Is there any way an iPhone app can remember the path it took to get to a particular page. For instance Home -> Subcategories page with parameter Category = Electronics -> List of products with parameter Category = MP4 players -> Product page with parameters productId = 398483 and productName = iPod Touch 8GB so that if I go back f...

images in tableview cells

Ive added a uiimageview as a subview to my cell.and then put a label on top of it so that it would seem like a button.But whwn the table is scrolled up or down the image seems to get painted again.This turns extremely ugly as my image has transparency effect which is lost as soon as it goes out of view and comes back.??? ...

iPhone timeIntervalSinceDate not throwing error, or working

I'm trying to find the difference between two NSDates. This worked once and printed the difference, but has never worked again. I don't remember changing any thing after the one time it worked. Any ideas? Oh, and it doesn't throw an error, and if I comment out this snippet everything works. //----------- Touches Begin - (void)to...

locationServicesEnabled always return YES

I tested my device (iPod Touch 2G iOS 4.1) if location services are enabled permitted = [locationManager locationServicesEnabled]; and I always get a YES whether location services are enabled or not. I'm talking about the general button for location services and not the app specific button. On iPad with iOS 3.2.2 everything is working...

Example from Chapter 1 of iphone 3D programming book not drawing to screen.

Hello kind people, I'm currently trying to learn opengl-es using O'Reilly's 3D programming for the iphone. It's first tutorial involves drawing the background of the screen grey. I've entered in all the code to the letter and it runs without error. Thing is I get no color... just black. What makes this such a hard problem to solve is t...

Adding an extra cell to the top of a UITableView in Cocoa

I have a table being generated from an array of NSManagedObjects. This works fine until I try to add an extra cell at the top of the table. Here is what I'm trying at the moment: -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { int menuLength = [mainMenu count] + 1; return menuLength; } ...

subscripted letters in UITextField placeholder

I need to learn about ways of doing this. The options I am aware of are: 1) Load my own custom font which includes subscripted letters, or 2) Simulate a "placeholder" with two UILabels positioned directly over the UITextField, and make those labels go away when the user starts typing. In my case, this will be more work than it so...

NSMutableArray how to properly addObjects and release

Hi all! I am worried about than am I properly adding object and releasing them. What NSMutableArray actually contain - object's copy or just a pointer to them? What is the sequence in working with NSMutableArray? (alloc, init, work, release) How to retain and release it properly? NSMutableArray *listData = [[NSMutableArray alloc] init...

Click Thumbnail to Expand Image in UITableView

Hey guys, So I have a UITableView that has a list of image names and corresponding thumbnails, and I'd like to implement some sort of click to expand thumbnails, so when a user clicks on the thumbnail, it expands to fill the whole screen. Is there an easy way to do this? It needs to only expand for the image part of the cell, not the te...

How advantageous is Phone Gap?

I am planning to do an app on all Mobile Platform. I found Phone-gap is a solution for write once deploy anywhere. The app just have to talk to a webservice and display information in a grid layout grouped under categories. Anyone who has developed apps in phone gap can share your views and thoughts on this. Does phone gap really ser...

Mapkit - Zoom level keeps resetting

Hello, I have the following code in place: -(void)viewDidLoad { //Set Zoom level using Span MKCoordinateSpan span; span.latitudeDelta = 0.05; span.longitudeDelta = 0.05; region.span = span; } -(void)locationChange:(CLLocation *)newLocation: (CLLocation *)oldLocation { // This zooms in on the users current loa...

[iPhone] MPMoviePlayerController not refreshing or accessing m3u8 on Live HTTP Streaming

I have a Live HTTP Streaming system working on a web server, and I want to see the stream on the iPhone. To achieve that, I instantiate a new MPMoviePlayerController and initialize it with the URL of the .m3u8 playlist, but I'm having some problems: If I try it with an already generated playlist, with the streaming already stopped, I g...

UITableViewCell gradient layer auto resize

I'm using the CAGradientLayer method from this answer to set a gradient on my UITableViewCells. However, for this table, I increased the height of the cells via tableView:heightForRowAtIndexPath:. My gradient layer now does not cover the full height of cell, but instead stops at the original height (see pic). I tried setting the fra...

Format array items for string output.

I'm trying to display the items in an array using the following: NSString *alertString = [NSString stringWithFormat:@"%@", path]; Which works fine, but when I display the string it gets displayed in the following way: ( A, B, C, D ) Is there a way to get it to display in a different way, such as all on one line and without brackets,...

UIAlertView is causing a EXC_BAD_ACCESS

I get an error with the following code. Essentially the app confirms calling the number when it is selected from the table view. The EXC_BAD_ACCESS is coming in when the ViewContoller with this alert is dismissed. It only happens if the alert is triggered. It does not if the table is only viewed with no selection. That tells me I am doi...

Setting contentOffset of UITableView in UIViewController viewDidLoad method doesn't take effect...

UITableView setting contentOffset in UIViewController viewDidLoad doesn't take effect... - (void)viewDidLoad { [super viewDidLoad]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; self.tableView.con...