cocoa-touch

Background problem on UITableView

Hi ! I have come to a problem, wich I have no idea how to solve. Can anyone think outside the box and point me to right directions? I would be very thankfull ! The problem. I have a UITableView containing a first row wich is always the same (a empty row with repeating background) Next rows are bounch of dynamic data rows. I have ...

Customizing Section indexes in UITableView in iphone application

Hello ! Every one. Does any one have tried to customize default section index displayed in UITableView. I want to modify the appearance of UITableView SectionIndex. Is it possible to customize it ? Is there any delegate methods available for this ? What delegate methods should I use - if above question's answer is yes? ...

Calling view method on timer?

I have setup a view and I want to cycle the color of some text on that view using a timer. Is there a timer method for a view that gets called (or I can setup to get called) on a regular basis? ...

Render layer offscreen

How can I create/prepare a CALayer offscreen, so that when the page is displayed, then all it has to do is to display the prepared layer? ...

How to auto-scroll UITableView?

I am trying to do something interesting. I am pulling some JSON data and populating cells in a UITableView. How can I make the UITableView scroll ever second or so? I want to give the effect that as new data is coming in, the table is scrolling, so it is streaming. Any ideas? ...

OpenGL ES - purple or black screen

Hi, I'm using OpenGL ES in my iPhone application and sometimes during startup the screen goes purple or black - in one case from twenty. This happens only during initialization and if the screen became black or purple it will remain in such a color - only restarting the application helps. Also I found out that when this bug happens, app...

Core Data fetch request with array

I am trying to set a fetch request with a predicate to obtain records in the store whose identifiers attribute match an array of identifiers specified in the predicate e.g. NSString *predicateString = [NSString stringWithFormat:@"identifier IN %@", employeeIDsArray]; The employeeIDsArray contains a number of NSNumber objects that matc...

I want to support UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft only

how do I make sure that UIInterfaceOrientationPortraitRight and UIInterfaceOrientationPortraitLeft are not supported. Basically I want my application to be used ONLY in UIInterfaceOrientationLandscapeRight and UIInterfaceOrientationLandscapeLeft I edited the Info.plist file <string>MainWindow</string> <key>UISupportedInterfaceOrient...

Landscape Mode ONLY for iPhone or iPad

I want to create an application that doesn't use Portrait mode. I am not sure if I need to edit the plist or have code in addition to the plist ...

Landscape Mode: Flip image when you flip your iPad

Apple demonstrated Photo's for the iPad. In their demo, they said you can Flip the iPad and it flips the image. How is this result achieved? I've been reading about UIInterfaceOrientation all day and I'm lost Any help would be appreciated. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { U...

UIDatePicker locale does nothing?

I'm creating a UIDatePicker programmatically, and setting its locale with the following code: datePicker.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"] autorelease]; The datepicker still appears in English (or whatever language I've set the phone to). Anyone have any idea why this does nothing, or how to fix it? ...

Moving UITableView cells and maintaining consistent data

I've enabled editing mode and moving cells around to allow users to position table view content in the order they please. I'm using Core Data as the data source, which sorts the content by the attribute "userOrder". When content is first inserted, userOrder is set to a random value. The idea is that when the user moves a cell around, the...

Left with extra UITableViewCell after re-ordering

After going into Edit mode, moving a cell, and leaving edit mode, i am left with one extra cell sitting on top of its duplicate cell while still in edit mode. The problem has to be somewhere in here: - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexP...

Darkening a UIView

I'd like to "darken" a UIView by a certain amount. Right now, I'm doing the darkening like this: UIView *overlay = [[UIView alloc] initWithFrame:mainView.bounds]; overlay.backgroundColor = [UIColor blackColor]; overlay.alpha = 0.5f; [mainView addSubview:overlay]; Unfortunately, this also adds a semi-transparent black overlay to parts ...

Compile OpenSSH for use in iphone application

I am trying to create an application to take advantage of OpenSSH to create an sFtp client for the iphone. I know that it is possible to create ssh clients for iPhone (iSSH, TouchTerm, etc) and I also assume they are using openssh as a base. Would I just need to create a static library? ...

Keep object oriented towards a point while it's animated along a path

I'm trying to animate an object along a path...while it's moving it should continue to "point" towards another object (or CGPoint). What should I be looking for in the framework (Cocoa-Touch) to accomplish this? Maybe something in CAShapeLayer? Though I think that's more for animating the path itself... It's not jumping out at me... ...

How do I use a modalViewController Identically in Two Controllers?

I'm using the Three20 TTMessageController in my app. I've figured out how to use it, adding on a bunch of other stuff (including TTMessageControllerDelegate methods and ABPeoplePickerNavigationControllerDelegate methods). It works great for me, after a bit of a struggle to figure it out. The trouble I'm having now is a design issue: I w...

UIImage change raw pixels from white to clear?

I've tried some code from each of these questions: How to make one color transparent on a UIImage? How to mask a UIImage so that white becomes transparent on iphone? but have come up unsuccessful, unfortunately working with Core Graphics and images is not my strong suit. How would I go about accessing a UIImage's raw data and changin...

Threading questions

If I spawn a secondary thread and the threaded method calls other methods, are those methods run in the secondary thread or the main thread? Is there a way to determine on which thread a specified piece of code is being run? ...

dismissing modalViewController all view move up by 20px

here i am using presentModalViewController and dismissModalViewController with animation set to "YES" in both cases. Which works fine. However, after the modal view is dismissed, all of the content on the main view has moved up what looks like 20px.Its effect all the viewcontroller. Any idea why did it happen and how to overcome it. ...