cocoa-touch

NSScanner not importing data

I'm trying to load a default set of data from a csv file into my core data db. So initially i'm trying to read in a csv file and output it to the log before trying to add it to the core data database. This is the code i'm using; //Find import file; NSString *defaultCSVPath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"csv"...

Why does this sometimes crash

Inside the function - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { I create an NSString, then give cell.textLabel.text the value of this string. Then I release it. The program will crash on getting one of the fields at the end. If I don't release the NSString, then the progr...

Iphone: Is this a bad Idea? Memory Management/Leak Issue

I have a class, that basically manages core data. inserts deletes and updates data. I initialize this class like so - (id)init { self = [super init]; if (self) { self.itemList = [NSDictionary dictionaryWithObjectsAndKeys: // <== LEAKS ITEMURL1, KEY1, ITEMURL2, KEY2, ...

iPhone meets Twitter implementation recieves NSURLErrorDomain error

Hi! I have implemented MGTwitterEngine in my application and it works near to perfect. The first "weird" thing that happends when I push the UIViewController where the Twitter form is, I recieve this in the Console: This app was previously authorized for a Twitter account so you can press the second button to send a tweet now. Shoul...

CHCSVParser in the main thread

Hello all, This is a follow-up to a previous post regarding the CHCSVParser from Dave DeLong. In short, I am using the CHCSVParser to work with an extremely large CSV file and parse the lines into Core Data entities (on an iPhone). I've got the parser hooked up and working, and am now trying to display a progress indicator to the user...

Sending larger data over Bluetooth through GameKit

Hi there. In my application, I'm trying to send two images that are wrapped up in an NSData object. I'm following the Game Kit Programming Guide and use the standard GKSessionDelegate methods and GKPeerPickerController. Unfortunately my data is larger than 86 kilobytes, so I have to fragment the data. Does anyone know of a way I would ...

NSFetchedResultsController

Hi, I am working with a UITableView that gets its data from an NSFetchedResultsController. I would like to add a UISegmentedController to my navigation bar that would toggle the table between displaying all of the records and only the records where starred == YES. I have read some other SO posts indicating that one way to do this is t...

iphone keyboard keydown/keyup events??

Hello Everyone, I am a newbie in iphone development, yet wondering why i am not able to find any help regarding the keyboard keyup/keydown events, I actually want to detect which key is been pressed by the user via keyboard on iphone while inputting the text in the UITextField. I need an urgent help!! ..... Thanks in advance Mehroz ...

How to implement utility application with navigation based flipside?

I would like to create an utility application that has a navigation based flipside, or "info", view. What would the most efficient way to accomplish this be? I think that i 'simply' need to make a root view controller for the flipside view...but i really only understand that conceptually...not so much how to go about it or, at least, i...

What are the exact circumstances in which I can reuse a UITableViewCell?

What are the exact circumstances in which I can reuse a cell (using dequeueReusableCellWithIdentifier in the UITableView class)? ...

NSBundle may not respond to +loadNibNamed:owner:options:

I am receiving the above warning in my code. I looked up the method in the documentation and found it was declared in UINibLoading.h. I tried importing this, but the warning didn't disappear. ...

Is it possible to stop UISearchBar from scrolling within UITableView?

For example: The UISearchbar within UITableView like of the iphone Address Book app scrolls with the the names. Is it possible to stop it from scrolling so it stays on top? Thanks! ...

When not to alloc and init an NSString

Whenever I need to create a new NSString variable I always alloc and init it. It seems that there are times when you don't want to do this. How do you know when to alloc and init an NSString and when not to? ...

Status Bar doesnot display when adding UIImagePickerController

Hi All, I wants to show Camera view in between Navigation bar & Tab bar, So I added the UIImagePickerController object as follows. picker = [[Camera3DViewController alloc] init]; picker.allowsImageEditing = NO; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.showsCameraControls = NO; ...

PDF parsing library for iOS?

Hi All, I wonder if there is a higher-level library for parsing PDF files in iOS (iPhone, iPad, iOS version 3.2) ? Specifically I'm looking for functionalities such as I can highlight a word or a sentence of text in a page and also to read PDF hyper-links and act upon them. I've looked up CGPDFScannerRef and it looks like the built-i...

Cocoa-touch - drawing with core graphics to a touch point

so i want to do something which seems pretty simple but is proving other wise, i want to just draw a square at the point that touch i registered. i cant seem to get it to work though. in touchesBegan i am calling a custom method called drawSquare that is sent a CGRect. i know i must be doing something simple wrong but i don't know enough...

UISegementedControl dynamic position (center)

Hi, How to apply horizontal alignment for a UISegmentedControl that contains dynamic segments ? Thanks. Stan ...

How to make a UITextView not take the focus when initializing?

I'm using code to create a detailed view pushed when you press a row of an UITableView, but theres a problem. The detailed view contain an UITextView and when a detailedView is called (only first time) this make the UITableView row pressed to lose its pressed state. It shouldn't ! It should lose the pressed state only when returning fro...

Detect external hardware which is connectd to iPhone

I need to detect an external hardware which is connected to the iPhone. Let say when the camera is running in our application and user plugss an external hardware device which is a camera and default behavior is propagated to the external hardware. In that scenarios how does the program know that the external hardware is plugged? Simply ...

Why do I have to reposition this UIView by an arbitrary amount?

I am building an application that must add an overlay view once a scrollview is done zooming. I was having problems adding the overlay to the scrollview itself and keeping the position consistent, due to what I assume is the scrollview not being done zooming...no biggie...so I decided to add the overlay to the sharedApplication's keyWin...