iphone

Load UIView in applicationdidFinishLaunching

I want to load a UIView, first time my app loads. But I can't make it happen. Here's my applicationdidFinishLaunching method: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if(![[NSUserDefaults standardUserDefaults] boolForKey:@"AlreadyRan"] ) { [[NSUserDef...

What are the ethical issues with using analytics in Mobile Applications?

I would like to implement Google Analytics in my iPad application. I am wondering if there are any approval process issues with this? Is there a best practice for allowing users to disable or enable tracking? Do you have any opinons about how ethical it is to track user app habits? ...

Can't get programmatically made UIButton to work - iPhone

Here is the code I'm using: -(void)viewDidLoad { NSString *checkerPath = [[NSBundle mainBundle] pathForResource:@"black-yellow-checker" ofType:@"png"]; UIImage *checkerImage = [[UIImage alloc] initWithContentsOfFile:checkerPath]; checkerView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 230.0f, 320.0f, 280.0f)]; ...

Mutliple rowHeight values in UITableView?

Can I make each cell a different height in a UITableView? How so? ...

Good Learning Method for Objective-C?

Hi I know this must be asked a millions times and can't be easy to answer as there is o definitive method, but any help would be appreciated, thanks. I have been playing around with all sorts of things in Xcode and with Objective-C, however I can't seem to find a good way of learning things in an efficient way. I have bought the book ...

Easiest way to post to a server on iPhone? I don't care about the response.

I've looked at some of the apple core API stuff, as well as ASIHTTPRequest. It's made me curious - is there a simple way to just send a nonblocking request to a URL? I could do it what seems to be the standard way - make the request object, make a useless delegate object that just ignores the response, and that's how I've been doing it. ...

Force NSFetchedResultsController update when association count changes

I have an NSFetchedResultsController which displays a list of items in a table view, including a count of an associated entity. When an object is added for this association (using addXXXObject), no callbacks are called to notify my controller of the update. How can I receive a notification of an object being added to the parent entity's...

Base64 Encode File Using NSData Chunks

Update 4 Per Greg's suggestion I've created one pair of image/text that shows the output from a 37k image to base64 encoded, using 100k chunks. Since the file is only 37k it's safe to say the loop only iterated once, so nothing was appended. The other pair shows the output from the same 37k image to base64 encoded, using 10k chunks. Sinc...

Calculate cell height based on number of lines?

I'd like to make a custom UITableViewCell height using (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath. I'm trying to get the height of the UITableViewCell by multiplying the number of lines in textLabel by the height of each line and then adding 10.0f for the subtitle. I am using the follow...

GAE as an XMPP server

In relation with this question. I am developing a mobile app (Android & iPhone) and I want users to be able to talk to each other. I learn from the question mentioned above that I can't use anonymous users and I need another server to handle that. I would actually want the users to register a jabber id based on UDID of the device for t...

Subclassing NSOperation to be concurrent and cancellable

Hello, I am unable to find a good doc about how to subclass NSOperation to be concurrent and also to support cancellation. I read the apple's doc, but I am unable to find an "official" exemple. Here is my source code : @synthesize isExecuting = _isExecuting; @synthesize isFinished = _isFinished; @synthesize isCancelled = _isCancelled...

ShareKit for iPhone randomly crashing

I am having some issues with ShareKit for the iPhone. I have everything I need(Twitter, Facebook, and Email mainly) working great for sending a URL. In another portion of my app however, I am trying to implement the ability to share a small bit of text. When I try to open Facebook when sharing this text, it opens the Facebook screen q...

Escape Double-Byte Characters for RTF

Hi. I am trying to escape double-byte (usually Japanese or Chinese) characters from a string so that they can be included in an RTF file. Thanks to poster falconcreek, I can successfully escape special characters (e.g. umlaut, accent, tilde) that are single-byte. - (NSString *)stringFormattedRTF:(NSString *)inputString { NSMutableString...

Orbit Object Around Center Point

Hello, I am attempting to orbit an object around a center point, much like the sun and our planets. However I am having no luck at all. Any help would be really great. Thanks. I'm writing in luna and I dont think there is a category for that here, but this probably is just general code. But if its in the wrong place, my apologies. loca...

iPhone app- How to upload image to .net C# WCF?

Hello Guys, I have a WCF service that my iPhone app is connected to. Now I need to add an upload photo feature to my iPhone app. That said, I needed to have my WCF service to accept Images and save it to my server. Any idea how to achieve this? I did googling for some possible solutions but neither of them works for me. Your responses...

issue with positioning of pop over view.

Hi, When I am switching between Portrait to Landscape view (&Vice Versa) in iPad, position of my popover view gets garbled. Here is how I am calculating frame of my popover view: aRect = self.myElement.frame; aRect.origin.x += aRect.size.width; [aPopOver presentPopoverFromRect:aRect inView:self.myElement.superview permittedArrowDirecti...

How can I flip a CALayer with CATransform3D?

Looking for help on how to have a CALayer flip like a UIView using CATransform3D. I have seen some articles but I'm having a hard time understanding the 4D and 3D coordinates system, model and references. I also read apple's documentation, but I'm not understanding it either. My goal is to flip a card located within a layer within a v...

NSThread problem in iOS

I have an app that loads multiple thumbnail images into a UIScrollVIew. This is a lengthy operation, and so as not to block up the display of the rest of the UI, I am running it in a separate thread. This works fine the first time at application launch, but later a new set of images needs to be loaded into the UIScrollView. When I detach...

iphone/ipad standard twitter oauth module?

I have seen the following in a few different apps so it seems like some kind of public api. Anyone where I can find the code for this? Specifcally the twitter login that appears in the popover: ...

iOS: can I use one timer to trigger multiple things at certain times?

I need a button to do different things depending on how far along the person is in watching a video. So for instance at 0-20 seconds it does thing A then at 20-25 it does thing B and 25-32 thing C Can I make a timer that counts up and fires different messages off at specific intervals to enable/disable my buttons or change what they d...