ios

Will use of the paypal ios library get my app rejected?

I'm developing an iPhone app with a subscription model, and I saw this ios paypal library: apple takes 30% of revenue of everything, but Paypal takes significantly less for micropayments (maxing out at 10%). Naturally, I became interested. I guess what I'm confused about is this: if apple wants everyone to use the in-app purchase librar...

store offline data for querying readonly data in ipad app

My app will consume a xml web service that will pull info, images and documents from the server and store it offline (docs and images are stored on a path, not in the database). I need to perform some simple queries on the offline data for viewing and browsing the offline data. There will be no updates made on the client, the data is re...

Pattern for Updating UITableView on Sync?

I'm working on a feed reader iOS project. Feed entries are listed in a UITableView in reverse chronological order. On launch, they're loaded from a database into an array. When the app syncs to feeds, it creates a new array for the new order of things, and then to update the table, compares the new array to the old array to determine wh...

Set height of MFMailComposeViewController when pushed in UIPopoverController on iPad

I have a share button in a popover that pushes MFMailComposeViewController. The popover correctly becomes a modal view, as it's supposed to, until i dismiss the modal. The problem is that, while it keeps the width of the popover (320.0), it grows to the height of the view. I would like to set the mail view to a height of 500.0. Here's ...

What's the most efficient process for parsing XML and building a Core Data database?

Let's say I'm getting I'm receiving XML files from some web service, like these two examples.. <news> <item id="123" created="10/09/10" expires="07/07/10" modified="10/09/10"> <title>Xiabo receives Nobel></title> <content>Lorem ipsum lorem ipsum</content> </item> </news> . <products> <item id="1" category="shoes"> <name>Nike Air</nam...

NSDecimalNumber and popping digits off of the end.

I'm not quite sure what to call it, but I have a text field to hold a currency value, so I'm storing that as a NSDecimalNumber. I don't want to use the numbers & symbols keyboard so I'm using a number pad, and inferring the location of a decimal place like ATMs do. It works fine for entering numbers. Type 1234 and it displays $12.34 but ...

How to Change UIButton title ?

MyViewController has one UIButton and another MainViewController use MyViewController. but MainViewController can't change UIButton title in MyViewController. also, in MyViewController only change UIButton title in viewDidLoad method. What's wrong? MyViewController @interface MyViewcontroller : UIViewController { IBOutlet UIBu...

XIB files vs. defining layout in code in iPhone

Aside from the WYSIWYG editor, what are the advantages of using XIB/NIB files over defining the layout in code in iPhone/iPad/iOS? While I don't find XIB files much useful, many iOS developers do, which makes me suspect I might not know their benefits or how to use them properly. ...

UIColor -colorWithPatternImage: alpha blending problem solution. (iOS SDK 4.1)

Solution note, not a question. I used this code to set background as a pattern image: UIImage *bg = SomeImage(); UIColor *bgc = [UIColor colorWithPatternImage:bg]; [self setBackgroundColor:bgc]; [self setOpaque:NO]; This works, but alpha blending doesn't work. Might be a bug. This code make it alpha blended on both of simu...

Any api to change iphone's system time?

is that possible to update system time programatically in ios? ...

SentTestCase doesn't highlight UnitTest failures as errors in code

I have setup UnitTests for some of the logic of my iphone app, I followed apple's guide for UnitTests in XCode, however when some of the assertions fail - instead of highlighting the place directly in code like a regular compilation error - XCode just displays the number of errors in the bottom-right corner and I have to look up the erro...

Why is my CGGradient not working with a preset UIColor?

I have this working code: NSMutableArray *shadowColors = [NSMutableArray arrayWithCapacity:2]; color = [UIColor colorWithRed:0 green:0 blue:0 alpha:1]; // Declaration using components [shadowColors addObject:(id)[color CGColor]]; color = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.0]; // Declaration using components ...

How to enable Data Detectors in a (sometimes-) editable UITextView

Does anyone know how the built-in Notes app manages to show data detectors and yet still have its UITextView editable? I've tried defaulting editable to NO (so the data detectors will work) then overriding UITextView's touches methods and setting it to YES, but it ends up scrolling to the bottom and I have to tap again to actually begin...

iPad orientation problem when iPad is laying flat on desk.

Hey, I have the following code: -(void)viewWillAppear:(BOOL)animated { UIDeviceOrientation orientation = [[UIDevice currentDevice] UIInterface]; if(orientation==UIDeviceOrientationLandscapeLeft || orientation==UIDeviceOrientationLandscapeRight) { NSLog(@"Device Landscape"); } else { NSLog(@"Device Portrai...

CTRunDelegateCallbacks and getAscent/getDescent problem. (iOS)

I'm trying to draw rich-text with images in iOS. I succeed, but there is a serious problem. I used CTRunDelegate to initiate space for each images, but the space only defined in horizontal. I could not specify vertical space size. Because getAscent/getDescent callback functions are not working. (getWidth is working.) I used code like de...

App Crashing in NSURLConnection

Hi all, I am trying to figure out what is causing this crash. I have built and given the app to our testers but we cannot seem to reproduce this reliably. It just happens sometimes... Thread 0 Crashed: 0 libobjc.A.dylib 0x000027da objc_msgSend + 18 1 Foundation 0x00032896 -[NSURLConnection(NSURLCo...

Line artifacts in mobile Safari

Safari renders black lines in between divs on my website at some scales. It is particularly bad when it breaks apart an image that is chopped in two different divs for a button or something. I can't put a BG in the parent of the two divs because they are transparent .pngs. Any solution or just deal with it? ...

How can I use OpenFeint and Facebook independently in the same iOS app?

I'm developing an iOS app that includes support for OpenFeint. OpenFeint includes support for Facebook, so if the user logs in to OpenFeint, s/he can post to Facebook. I also want to allow the user to post to Facebook if s/he chooses not to login to OpenFeint. Is there a way to do this? If so, how? ...

Apply animation in specified UIView?

I want to make an animation like SwichView example in "Beginning iPhone development". My animation code: [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:1.25]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRi...

How can i get WWDC10 sample code? (104. Designing Apps with Scroll Views)

i saw WWDC10 session "104, Designing Apps with Scroll Views". and i want get sample code using demo. but i can't find it. i found "ScrollViewSuite" but it's not same demo. it's not provided? ...