Hello,
I'm developing "landscape mode-only" app for an iPad.
Problem is that my views have wrong positions on the screen, and I can't find the reason...
I've set necessary properties in the Info.plist:
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
<key>UISupportedInterfaceOrientat...
I have a UITableView and would like to apply a background image to all cells. My height for each cell is variable. How should I go about creating the background image?
cell.contentView.backgroundColor = [UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]];
...
I have a very strange date format coming to me via JSON. e.g. - "July, 18 2010 02:22:09"
These dates are always UTC. I'm parsing the date with NSDateFormatter, and setting the timeZone to UTC...
NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
...
I got a subclass of UIView in which I draw an NSString object using the drawInRect:withFont:lineBreakMode:alignment: method.
Unfortunately, when I change the orientation of the device, say from portrait into landscape mode, the text doesn't get redrawn correctly but gets scaled and distorted against my intentions.
How can I solve this ...
hi
I use UIScrollView, which zooms and scrolls UIImageView, which contains UIImage, which take pixels from CGImage.
Size of CGImage may be about 5000x2000 pixels
1) Is this a correct way to zoom and scroll big image?
Some logic may change periodically some region(rect) in that CGImage
2) How can i change individuall pixels in CGImage ...
I have just been reading about the MVC design pattern for Cocoa-Touch applications and it suggested using a property list for the model. My question is if you needed to do some calculation on the data in the property list where would the code for that calculation go?
In the past I have used a singleton object for my model and then used ...
Hi folks,
I need to initialise images from raw data downloaded from a server which delivers the correct size of image based on the type of iPhone client.
I know that I should be setting the scale value to be 2.0 on the 640x960 display, however this is a readonly property and cannot be set during the init when using initWithData.
Any i...
Hi guys. Basically what's happening is that I need to download a whole bunch of files in my app and I've set up a queue of sorts that downloads each file with an NSURLConnection and stores the server response incrementally in an NSMutableData until the download is finished and then writes the whole thing to disk.
Here's the relevant par...
i am using navigation controller and my first view contains tableof data of chapters type and
then when user selects any one of those it goes to next view of topics type and when user selects any one of these it should show some table of data consists section headers and ruler items...
application getting crashing when i selects topics ...
I'm trying to keep my app compatible with iOS 3.1 while also adding support for some new features of iOS 4, like limited-duration background tasks (beginBackgroundTaskWithExpirationHandler:).
Of course the proper way to do this is to check respondsToSelector: for each appropriate call, but I'm still afraid I'll miss a call here or there...
Hi,
I'm currently trying to populate an UITableView from a plist downloaded from the internet. The plist gets loaded into a NSMutableArray and then saved as a file, which works fine.
When trying to populate my UITableView with it though, I run into trouble.
The UITableView displays only the first 8 entries from the *plist file (but t...
Is there a method to go back 1 view in the stack on a UINavigationController? Or to a view with a specific title?
...
I've been trying to build a UI that's as similar as possible to the built in iPhone 'camera' app as possible. Necessarily I've been using the UIImagePickerController class.
It imposes on me two constraints that I wish to overcome...
I'd like to be able to take more than one photo (currently mine takes one then comes to a sudden stop.
...
How can I change the color of an individual pixel programmatically in the iPhone sdk?
...
I have a UITableViewController that is pushing some views when clicking on a cell:
switch(indexPath.row) {
case kFollowerSectionUpdatesCountRow:
stockTwitsView.reloadUpdates = TRUE;
stockTwitsView.showHomeButton = TRUE; //** reversed, true means hide the button
...
I am trying to support multiple orientations within an iPad application, and the views that the designer came up with aren't able to be setup with purely the springs/struts model. I have laid out the views in two seperate nib files and currently use the follow...
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)...
I'm using a custom UIGestureRecognizer subclass to track gestures on my InfoView class. The InfoView class is a subview of a custom UITableViewCell subclass called InfoCell.
I've added my gesture recognizer to my root view (the parent view of everything else on screen, because the purpose of my custom gesture recognizer is to allow dra...
I should know this by now, but I am still a bit confused. When my app navigates from one view controller to the next (via the navigation controller) I want to "finalize" the data for the current VC before going to the next VC. The only way I see to intercept the "page swap" is in the [old view viewWillDisappear] -> [newView viewWillAppea...
I have a background thread that goes off to a server and gets XML which then renders it to a graph.
I have an NSTimer which fires off a request every 5 seconds, what is typically the best way to stop the execution of a thread altogether (if at all possible), I know you can subclass NSInvocationOperation and implement the cancel method, ...
Hi all,
I'm working on an application with three tabs plus a small view in which I created a sort of TopBar that contains some info and some buttons.
In the main application delegate I define:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
// Add the tab bar controller's current view as a subview of the...