Tag: ipad

failed to find PDF header: '%PDF' not found

I am trying to download pdf content from webservice endpoint which is coming as binary. After decoding into base64 I am attaching the decoded file to webview, in which failed to find pdf header error is displaying. Does anyone know how can I proceed to fix this error? Am I missing any step here? Thanks.

Mutable sets in NSManagedObjects?

The standard declaration for an autogenerated NSManagedObject property declares to-many relationships like this: @property (nonatomic, retain) NSSet *somethings; … @dynamic somethings; Would it be safe to change that declaration to an NSMutableSet? Would the CoreData component still function correctly? Judging by the @dynamic, it probaby doesn’t care if I use an NSSet subclass rather than […]

How do I properly use CCSpriteFrameCache and CCSpriteBatchNode?

I do not understand what I do exactly when I add a CCSpriteFrameCache or CCSpriteBatchNode to my cocos2d application. Can somebody please explain the following points (it would be helpful if you could explain a few; please write the corresponding letter in front of your answer according to which question you are answering): [all questions […]

Core Data iPad/iPhone BLOBS vs File system for 20k PDFs

I’m designing an iPad/iPhone app using core data. The main focus of the app is sorting and viewing up to 20,000 PDFs They are ~200KB each. Typically its best to not store BLOBS in a DB, but for desktop systems I’ve typically seen it said that if the blobs are < 1 MB then its […]

How to disable letter characters in UITextField?

In my application i need to allow users input only numbers. How can i allow UITextField to receive only numbers from user?

How can I dismiss a pushViewController in iPhone/iPad?

I need to make a button to dismiss the child view controller from a pushViewController. The action is exactly like the left (back) button on the top navigation bar. How can I dismiss a pushViewController? Which method should I use ? Thanks.

Character occurrences in a String Objective C

How can I count the occurrence of a character in a string? Example String: 123-456-7890 I want to find the occurrence count of “-” in given string

presentModalViewController from app delegate

How can I present a modal view controller from the app delegate’s view, the top most? Trying to present a modal view controller from a UIView, which made me confused.

Using UIActionSheet on iPad

Apple’s documentation for the UIActionSheet is causing me confusion. First off, in the iPad Human Interface Guidelines, it says : To learn more about using an action sheet in your code, see “Using Popovers to Display Content” in iPad Programming Guide. But then in the “Using Popovers to Display Content” section, it doesn’t mention Action […]

black background when overriding drawRect in UIScrollView

So I am trying to override drawRect in my UIScrolLView, however it gives me this black background instead of the background color that I’ve specified for my UIScrollView. Why is this? If I remove the drawRect code then everything is fine: – (void)drawRect:(CGRect)rect { [super drawRect:rect]; if (shouldDrawVerticalLineForProfile){ CGContextRef context = UIGraphicsGetCurrentContext(); CGColorRef separatorColor = […]