cocoa-touch

Dismissing UIPopoverController with -dismissPopoverAnimated: won't call delegate?

I have my UIPopoverController with self as a delegate: I receive calls when I tap outside the popover controller, but when I tap inside I want to dismiss too, so I use -dismissPopoverAnimated: but delegate is not called in this case. Is this normal? Is this a bug or I am doing something wrong? newDocPopoverController = [[UIPopoverContro...

Weird crash when saving managedObjectContext

I am getting a weird crash when I try to save my model. This is my code: TJModel *model = [TJModel sharedTJModel]; NSFetchRequest *request = [[[NSFetchRequest alloc] init]autorelease]; [request setReturnsObjectsAsFaults:NO]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"TJVideoList"inManagedObjectContext:[model ...

MobileSafari UILabel

Hi, I was wondering how the UILabel that displays the website's title in Mobile Safari is created? It's obviously some kind of a subclass and I've attempted to copy it by using my own subclass,but it just doesn't look the same. I also don't know which font they're using :/ Could anyone help me out please? :) here's my class: CGSize s...

Why are MKPolyline and MKPolygon working in iOS 3.2.2 (on an iPad)?

As far as I can tell, technically MKPolyline and MKPolygon should not be functional/available when running on an iPad or any other device prior to iOS4. Nevertheless, when I installed 3.2.2, on the device, and updated my build tools with the latest (non-beta) iOS 4.2 SDK, they both work just fine, along with their associated views. Wha...

UIView subview is not autorotating or auto-sizing for iPad

In my iPhone app, I have a UIViewController with two subviews: a main UIView (let's call it mainView), and a secondary UIView (let's call it secondView), which is usually hidden but is sometimes shown (e.g. user settings). In my UIViewController, self.view is set to mainView. When the user switches to the subview, I call [self.view addSu...

"Back" button not displaying in navigationItem

I came across a very subtle issue. Usually things are okay, but occasionally the current UIviewController has no title. When I call another viewcontroller called via [[fruitDB navigationController] pushViewController:fruitc animated:YES]; there is no "back" button. The area on the top left of the navigation bar is still active thoug...

How to change UITableView with UISegmentedControl

ok, so I have custom cells with UISegmentedControl and UILabel - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"testCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { [[NSBundle mainB...

iphone UIDatePicker showing wrong date in Central Timezone

Hey all, I am at a loss. I have an NSDate that gets passed to a UIDatePicker. When I am set to the Eastern time zone, all is fine. When I am set to Central, the date picker shows the time as being off by 1 hour. So, if I turn my NSLogs on, this is what I show: 2010-08-25 18:15:19.317[59299:207] ---- into the picker --->2010-08-25 17:3...

UITableViewController - disable selection

How can the ability to select cells in a Cocoa Touch TableView be completely disabled? I have managed to get my code to a state where selection seems not possible, but if you hold your finger on a cell for a moment or two it will turn blue (selected) until you move off it. How can it be completely disabled? ...

Setting UITableViewController Delegate?

If I have a class of type UITableViewController and I am going to add the required delegate methods to that class am I right in thinking I don't need to specify a delegate as the class defaults to using itself? ...

Why is the linker presenting an error about MPMoviePlayerController when building my application?

When I build, I'm receiving this error during the linking stage: ".objc_class_name_MPMoviePlayerController", referenced from: literal-pointer@__OBJC@__cls_refs@MPMoviePlayerController in MovieDemoViewController.o "_MPMoviePlayerPlaybackDidFinishNotification", referenced from: _MPMoviePlayerPlaybackDidFini...

MFMailComposeViewController crash on addAttachementData

Hi, I have an issue with sending an e-mail with the app logs(just a few times I've encounter this - when the logs where bigger).Could someone please tell me on what should I focus to solve this situation?Because I've no idea what could cause this.The app crash when sending a log which has 264 kb and the device frozen.After restart, I wa...

Cocoa Touch - UISegmentedControl title is not working in IF/ELSE statement.

I'm trying to write a basic DST converter. I have a segmented control with 3 choices, their titles (surprisingly) are Distance, Speed and Time. I have 2 input text fields and a calculate button, as well as 2 labels for each text field with the type of measurement required and it's units. Making a selection on the segmented control should...

iPad: UITableView Within UIView Covers Elements When Scrolled

I am attempting to place scroll view within a UIView that is smaller than the entire iPad screen. I simply add the scroll view as a subview of the UIView and it appears just fine, however when I scroll it, it moves outside of the bounds of that UIView effectively covering up any UI elements that are placed above it. Is there some way to...

UIPickerView tap to scroll & custom row UIViews

You can scroll an UIPickerView both by swiping and by tapping items under or above the selection belt. You can populate an UIPickerView by either specifying NSString as titles or reusable UIViews for each row. What I've noticed is that when I switched from providing strings to providing view, tap to scroll no longer worked. Is this exp...

Setting UITextView selection on tap

I've got a UITextView that is not editable by default so that data detectors show addresses and phone numbers. I'd like to be able to let the user single tap anywhere in the text view to set it editable and put the insertion point there. Unfortunately, I can't get the insertion point and a single tap just enables editing of the text vi...

How do i load a new xib on an orientation change on the ipad?

How do i load a new xib on an orientation change on the ipad? ...

Grid of Buttons on iPhone that Can be Dragged Over

I am looking to create a simple colour palette, and have setup a grid of buttons in interface builder. I'd like a user to be able to interact with the palette (buttons), by selecting any button, then drag the finger between buttons (firing events on entering and exiting a button and changing the selected colour with each event). Is thi...

Should I release the NSError object of NSFileManager's copyItemAtPath:toPath:error: ?

NSFileManager has a method to do copying. - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error If an error occurs, the third parameter (NSError **) upon return will contain an NSError object describing the problem. Question: do I need to release it? There are some other methods, for example t...

Unit Test Cases for views/viewcontroller and Delegate functions for iPhone

hi, I need to write unit test cases for my views.Using some apple demo projects i learnt how to write a unit test case for simple functions(which includes mathematical logic like GCD,Prime etc). now i need to understand the same for Appdelegates and views. so I need to know 1.how to start writing cases for delegates,views and learn the ...