iphone

Scrollview inside containerView won't scroll?

I have a UITableViewController subclass that has a container UIView which has 1 of 2 subviews: the tableview, or a UIScroll depending on whether or not the view is "flipped". my viewDidLoad() method adds the tableview to the container: [kContainerView addSubview: self.tableView]; self.view = kContainerView; and initializes the UIScro...

What is the difference between applicationDidReceiveMemoryWarning , didReceiveMemoryWarning?

Hi all, What is the difference between applicationDidReceiveMemoryWarning and didReceiveMemoryWarning ? And what is the best way to handle those warnings. ...

Disable persistence of a given NSManagedObject until user hits a button?

I have an NSManagedObject with attributes that a user can edit with a view. The view is populated with the values from the object, the user can edit the values, and the values are written back to the object. I want the user to explicitly tap a save or cancel button to commit or undo the changes. The problem is that the view is in a UI...

Trying to pass CGrect to performSelector withObject

Hi, I'm trying to pass a CGRect: SEL frameSel = NSSelectorFromString(@"setFrame:"); CGRect rect = CGRectMake(10, 10, 200, 100); [object performSelector:frameSel withObject:rect ]; But this does not compile I also tried: SEL frameSel = NSSelectorFromString(@"setFrame:"); CGRect rect = CGRectMake(10, 10, 200, 100); NSValue * value = ...

Is there a difference between only <NSXMLParserDelegate>, only setDelegate method, or the use of both of them ?

Hey, I noticed that when I do this : [myParser setDelegate:self]; it works :D (even if I didn't add the code in the header file ... you know, the <delegateStuff, delegateOtherStuff> in the interface declaration) When are you supposed to modify the header file to make your delegate work ? Is the setDelegate method enough to ma...

UIKit: Animating a view while it's being moved by touchesMoved

So, I have a UIView subclass called MovableBlock. It overrides touchesBegan, touchesMoved, touchesEnded and touchesCancelled. The moving about part works just fine. When a MovableBlock is moved to the left side of the screen, it's 130px wide. When it's moved to the right side of the screen, it's 80px wide. I'd like to animate the transi...

Grouped UITableView displays fine, but only once

What would cause this? I have a grouped tableView that I've added in IB. 2 groups. 3 rows in each group. It displays fine when my app is first run. (So I know I'm doing SOMETHING right. Wouldn't that mean that I (at least) have my Delegate, DataSource, IBOutlets, and connections set up correctly?) But when I click on a button that...

How to store parsed date value as date format in mutable array as mutable dictionary in iphone?

I am new to iphone development .I have parsed a xml page and stored the title, date, summary, in a mutable array "stories" as mutable dictionary "object for key".All the values are saved as string But i want to save the Date value as date format.So that i can sort it with date.How can i achieve that.Please help me out.Thanks ...

Sorting by date format in iphone

I am new to iphone development.I am sorting a mutable array with respect to date.But it is sorting Using the date parameter consider it as string.I want to sort it by date.How can i achieve that .Please help me out. NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"pubDate" ascending:YES]; [stories sortUsingDescrip...

iPhone - encode Array of Data from CoreData Entity and store in Base64 String

I have a data model with three entities (Purchase, Items, Image) the purchase is the main with the other two as related attributes. I need to be able to send the data to a web server, and I must encode in base64, I have a couple of classes that take care of the encoding and decoding that i downloaded from the net, they are categories fo...

iPhone - Interface Orientation reversed?

Hi I have this piece of code... - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } and - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if(UIInterfaceOrientationIsPortrait(interfaceOrientation)){ // WTF, this runs when I chang...

Are there any iPhone Audio Frameworks that support scrubbing and 2x?

Do any of the iPhone Audio frameworks (or open source frameworks) support scrubbing and 2x (i.e. ability to play audio at 2X, 3X the normal speed)? ...

What are some possible causes of iPhone rejecting UDP packet?

On iPhone, I am running an app with AsyncUdpSocket library to take care of UDP networking. I have tested it. I can send UDP packet from my iPhone to a server that runs Java program accepting UDP correctly. However, when it is the other way around, Java program's UDP message doesn't get through to iPhone. So I decided to test the library...

UITableView won't accept pass through touches

I am trying to pass through touches from a custom UIView to a UITableView underneath (the UIView is directly on top of the UITableView). However, it does not seem to be working. In my custom UIView, I have tried all of the following (I'm using touchesMoved as an example but I've implemented this for all 4 touch methods) - (void)touche...

How to get the usage time (age of), Modal Number, software version of the iPhone using obj c

Hi! Anyone can tell me that how can I get the total life age (usage time), Modal Number, software version of the iPhone using obj c. Also how can we check that iphone is jailbroken or not using objective C. Thanks MAS ...

Can't open Tab Bar Controller in IB

I've only just started learning to build iPhone apps using xcode. I'm slowly getting the basics, but I've come across a problem in Interface Builder. When I create a new project using the Tab Bar Application template, I can't seem to do anything with the Tab Bar Controller in main.xib. When I double click the file, IB opens up fine, bu...

UIWebView: Can You Disable Javascript?

You can disable Javascript in both mobile Safari and Cocoa's WebView but I can see no means of doing so in UIWebView. Am I correct? I ask in relation to this question regarding obtaining the title of page displayed in an UIWebView using Javascript. I had worried that it would fail if Javascript was disabled but it appears the API does...

UITableView to "float" on top of background

I have a standard, grouped UITableView that I am trying to add a custom background to (instead of the boring gray stripes). Ultimately, my designer would like the table view to "slide over" or "float over" the background. I have gotten as far as setting the background of the table view to "clear" with the hopes of showing a static image ...

Extracting digits from integer and decimal parts of a double

Hi, I would like to know what would be the most elegant approach to extract digits from a double in ObjectiveC using Cocoa Touch (this needs to run on an iPhone): Let's suppose you have a double : 1.423 How would you get each "1", "4", "2", "3", that compose the double in several variables ? In the end I would like to get something...

How to link a SQlite Extension Source File into Xcode for iPhone?

I use a statically linked library for Sqlite in an iPhone Xcode project. I am now trying to include a .C extension to Sqlite in this project. However, I am having trouble making the Sqlite in the build SEE the extension. The statically linked Sqlite library works fine. Also the .C extension works on my desktop, and builds fine as a stat...