cocoa-touch

How to delete a cell in UITableView by using custom button in cell ?

I have UITableView. I customized the cell height (80.0f). I have 4 labels(UILabel) and 1 image(UIImage) and 3 buttons (UIButton). one of the button is delete button. By touching the cell or button(play button) on the image a video is loaded and played. I need to delete the cell by touching delete button. I wrote a selector for d...

Help moving multiple images at once with touches

Here is my problem: I am trying to move a puzzle piece around the screen and then connect to the other piece if they are in close proximity. I have achieved this, though it is perhaps a little odd the way I did. My problem though is that once they have connected, I can't figure out how to move them as one image, instead of two separate e...

Error loading my managedObjectModel

Hi guys, When I call [myAppDelegate managedObjectModel], in the retain line below, my application will crash (iPhone SDK v3.1.3): - (NSManagedObjectModel *)managedObjectModel { if (managedObjectModel != nil) { return managedObjectModel; } managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:nil] retai...

How to delete all objects for a given entity from the ManagedObjectContext

I don't want to use the reset method for my ManagedObjectContext. I only need to remove all of the objects for a specific entity, but I don't see any methods for doing this. Selecting all of the objects for a specific entity and looping over each and deleting them works, but it's very slow. ...

Why does Apple create its views this way

In the hope of fixing a bug of mine from another post i would like to know why apple writes this (for it's Elements example) UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; self.containerView = localContainerView; [localContainerView release]; instead of the simpler method: contai...

Tab bar action problem

hi, hello,I want that i load a xib on tab click after condition check.where i put the condition in my code.i put in view did lode but not working.please help me ....... ...

When the current toolbar is touched previous toolbar items are activated.

I have a UIToolBar *toolbar1. I have 3 buttons on the toolbar. And the tool bar is at the bottom of the view. The buttons are like library button, moreApps button, recordVideo button. If I touch the library button a new view(a UITableViewController) appears. I used presentModelViewController for it. If I touch moreApps button a new view...

Cocoa NSString explode

Hi all, I have a NSString: @"1a,1b,1c,1d,5c". I want this NSString separated into a NSMutableArray, but I don't know how. I think it is fairly simple but I can't find it (maybe because my English isn't good enough to find a good description for it to search on). Regards, Dodo ...

NSString to NSUInteger

Hi all, I've got a number in a NSString @"15". I want to convert this to NSUInteger, but I don't know how to do that... Regards, dodo ...

UITableView and SearchBar problem

Hi all, I'm trying to add a Search bar to my UITableView. I followed this tutorial: http://clingingtoideas.blogspot.com/2010/02/uitableview-how-to-part-2-search.html. I'm getting this error if I type a letter in the search box: Rooster(10787,0xa05ed4e0) malloc: *** error for object 0x3b5f160: double free *** set a breakpoint in malloc_...

Regular Expression doesn't match

Hi All, I've got a regular expression in my cocoa-touch app (using RegexKitLite). NSString *week = [[NSString alloc] initWithFormat:@"%@", [pageContent stringByReplacingOccurrencesOfRegex:@"<select name=\"week\" class=\"selectbox\" style='width:134' onChange=\"doDisplayTimetable(NavBar, topDir);\">(.+?)<option value=\"(.+?)\">(.+?)...

name of UIView that was touched

Hi, How can I get the name of the [touch view] in the touchesbegan event. So if it were UIView *aaaaaview I would get aaaaaview as the return; Thank You, nonono ...

Why is my UITableView not being set?

I checked using the debbuger in the viewDidLoad method and tracerTableView is 0x0 which i assume means it is nil. I don't understand. I should go ahaed say yes I have already checked my nib file and yes all the connections are correct. Here is the header file and the begging of the .m. ///////////// .h file //////////// @interface T...

UIPageControl in a ITableViewCell gets shoved to the top left corner

I'm trying to put a UIPageControl inside a cell (there's nothing else in the cell), but I have two problems: The dots are aligned at the top-left of the cell, so you only see the bottom-right quarter of the first dot, and the bottom half of the other dots (like the first dots center is 0, 0). Unless you tab the cell to select it (goes ...

UIToolbar UIBarButtonItem Alignment question

I need to create a UIToolbar that has two UIBarButtonItems. The 1st button must be centered and the 2nd item must be right aligned. I understand and use Flexible spacing and it works great when I need to balance buttons across the UIToolbar, but with only two buttons, I can't seem to perfectly center the middle button. I've even initial...

UIPickerView not displaying

I have a UIPickerView on a UIView. I've implemented its protocol in the .h and delegates in the .m files: <UIPickerViewDataSource, UIPickerViewDelegate> In IB, I've connected the above to the picker, which I also have an IBoutlet for. The methods look like this: - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePicker...

how to crop an image using rectangale overlay and touch on iphone

Hey Everyone, I am looking for a good tutorial or sample code, that would show how to crop an image taking from iphone camera something in lines of http://img192.imageshack.us/img192/8930/customcropbox.jpg but you would control the corners with your fingers any tip would be greatly appericated, as i am new to iphone dev. Thank...

Changing position of selector programmatically in Pickerview when it is initially loaded.

How can we change the position of the selector in the Pickerview when it is loaded. For example, I want to make row 3 initially selected when it is loaded. Anyone please help. ...

How to enable .com key for UITextField keyboard?

How do I enable the ".com" key on the keyboard for UITextField? As an example, this key shows up when user clicks on the navigation item for the apple browser. Is there a web-specific keyboard layout I could specify? ...

springboard takes too much CPU

Is there a way to increase the application priority for the CPU on iPhone? I notice that SpringBoard takes up too much CPU at times causing some fluctuation in performance on the device. ...