cocoa-touch

how to draw on the surface of imageview transparently

i want to track finger touch and draw the path on top of the imageView. following is what i did: In the touch event: UIgraphicsBeginImageContext(imageView.frame.size); [imageView.image drawInRect:CGRectMake(0,0,imageView.size.width,imageView.size.height)]; //drawing..... imageView.image=UIGraphicsGetImageFromCurrentImageContext(); UIG...

Interact with UIProgressBar from model class

I have a MainViewController in my Cocoa Touch app which shows a status view containing a UIProgressBar view. From the MainViewController, FlickrImage model objects are created and iterated over. the FlickrImage objects themselves interact with the Flickr API, which takes time which is why I want the user see the progress bar. The challe...

Allow touch events only on some selected labels of view

hello, I am a newbie in iPhone development, doing my first app. I have some labels on screen out of these labels I have to appy drag event on few selected code for dragging is - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point CGPoint pt = [[touches anyObject] locationInView:self]; ...

UITextView Text alignmnet at Top

I'm using UITextView to display a text read from XML file. On click of a button, it will read next entry from XML file and replaces text in text view accordingly. Its working fine. But the trouble is that, some times, the text starts at 0,0 location in text view and some times, its leaving some space at the top of text view and displayin...

How does -performSelector:withObject:afterDelay: work?

I am currently working under the assumption that -performSelector:withObject:afterDelay: does not utilize threading, but schedules an event to fire at a later date on the current thread. Is this correct? More, specifically: - (void) methodCalledByButtonClick { for (id obj in array) { [self doSomethingWithObj:obj]; } } static ...

Settings menu through UITableView

I'm trying to build a nice looking config-screen using UITableView (much like the settings on the iPhone, in the clock etc). I'm having some doubts as to how aproach this; I will need some UITableViewCells with switches in them (right now placed in the accessoryView), other that link to further pages and a detailLabel indicating the cur...

Using view.bounds to make boundaries

I'm working on a few basic apps/utilities/games with the iPhone to get a better grip on it. I currently have a setup where a CGRect moves wherever the finger moves, however I don't want the CGRect to go outside the bounds of the view. Original Method - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touc...

How to securely communicate with server?

I'm building a solution consisting of an app and a server. Server provides some methods (json) and the app uses them. My aim is to make those API methods inaccessible to other clients. What is the best way to do so? Should I take a look at certificates (to sign every outgoing request)? If yes, where do I start and what is the performance...

iPhone Accessibility using "Red on Black" for images

Is there a way to convert an image on the fly to "Red on Black" for accessibility? I have pictures that I want to stream to the iphone. Viewing them at night, Red on Black is better for viewing. ...

dealloc method is calling three time, during the runtime.

I'm developing an iphone application and i have small problem on it. I'm using popup caller methods into my appdelegate.m file bellow like that -(void)OpenInfo{ InfoDetail *detail = [[InfoDetail alloc] initWithNibName:@"InfoDetail" bundle:nil]; self.infoDetail = detail; [detail release]; [window addSubview:detail.view]; ...

Sending user to view from search results

I'd like to implement a search into my app. I'm planning to use a left swipe, like the Spotlight search. Would that violate anything with Apple? My app is tableview based. The user can drill down a few levels before reaching a detail view. I'm considering two options for implementing the search: 1.) From the search results, I displa...

Trying to reload my parentViewController's data but failing

Trying to [self.parentViewController.tableView reloadData] from a save: method in my DetailViewController but getting my favorite error: request for member 'tableView' in something not a structure or union. Included the header for my RootViewController and casted the parentViewController as a RootViewController to no avail. What have ...

NSMutableDictionary setobject giving "message sent to deallocated instance" error

This line of code: [mymutabledict setObject:myclassobj forKey:myclassobj.myidstring]; Is giving this error: *** -[NSCFString hash]: message sent to deallocated instance 0x3c14610 I put in a breakpoint on that line and I've checked and all 3 objects (mymutabledict, myclassobj, and myclassobj.myidstring) are correctly allocated and ...

Blurry UILabel text in accessory view of MKAnnotationView

Hello there, I'm trying to add a UILabel to an MKAnnotationView as a leftCalloutAccessoryView right after a pin got selected for the first time in the MKMapView. Adding the label is not a problem: The callout gets selected and opens, and this is when I add the label to the callout view. The callout gets automatically expanded to the lef...

Scroll tableview without user noticing

I need to scroll a tableview on initial load of my RootController. The problem is that I have to wait until cellForRowAtIndexPath completes before I can do anything using scrollToRowAtIndexPath. cellForRowAtIndexPath seems to be the last event for me to hook into after the table has loaded. Because the view has already loaded, the tab...

Cocoa touch UI not updating timely - threading issue?

I have an issue with threading in Cocoa Touch. I call a collection class initializer from my MainViewController directly like this: [flickrImages initWithBoundingBox:currentBoundingBox]; This collection has a progress property which is observed by the MainViewController. This posts floats between 0 and 1 to drive an UIProgressView. Al...

Managing UIView layers and moving a view between view hierarchies

I'm gussying up a Cocoa-Touch UI composed of basically two view hierarchies. Users need to drag objects from one (hierarchyA) INTO the other (hierarchyB). The problem I'm having is with the layering of these views, especially as they're being dragged. I don't know of a way to allow parts of hierarchyB be layered below a UIView from hiera...

UIDatePicker graphical glitch

I'm experiencing a bad looking graphical glitch with UIDatePicker, and I'm wondering if anyone else has seen and/or resolved it. It is something non-deterministic, because every once in a while it goes away and looks normal. Check out the highlight and shadow bars are shifted... I have tried removing all other graphical elements. I...

What tool or technology does Apple use to create its documentation?

I am sure they use something really fancy to create their documentations and guides. Everything is so streamlined and equal, and they always have a HTML and a PDF version. Now we make a big framework and want to provide a good documentation that's set up the way Apple does it. Online in HTML format and offline in PDF. Any idea how the A...

Create a porthole animation transition on the iPhone?

Can anyone recommend how I might be able to create a view transition that looks like a circle expanding from the center of the view? Any pointers would be helpful, or maybe a link to some similar code, even in a different language. ...