cocoa-touch

MVC and the communication between them. What did i miss?

Hey all, trying to learn objective-c. It was going quite well, until I realized I was missing a link. When building in the spirit of MVC, I understand it as you Model and View should never talk to eachother. I have this problem I'm messing around with now. A model containing a polygon class. Contains an polygon object with attributes...

Trying to order built-in UIAnimations, not having much success

OK, I have a screen in my iPhone app that looks like the following: When the Add Notes cell is touched, I would like for the keyboard to disappear, THEN I would like it to modally display the Edit Notes Screen (which also has a keyboard, but I would like for it to animate back on screen). Right now it animates everything at once (the ...

UITabBarController - more than 20 views

I am using a tab bar (UITabBarController) on my app and I wish to have more than 20 different views to choose from. If there are more than 5, "More" menu appears. I can access any of my views from "More" menu but I have problems with customizing my TabBar with "Configure" (Edit) navigation bar. I can see only 20 first view icons and I ...

UIKIt: Resizing a view to accommodate subviews

I've been looking at the way resiznig works in Cocoa Touch and it looks like without writing any code, a UIView cannot be set up to size itself based on the size of it's children. There are plenty of options to resize and re-position child views when their containing view changes size, but nothing that works the other way round as far as...

Why does Instruments think this is leaking memory ?

I have an About View which I push onto a NavigationController. The view has one UILabel which is connected to an IBOutlet. In viewDidLoad I populate the UILabel with the bundle version number (a string). Testing with instruments suggested that the line marked with a comment is leaking memory: - viewDidLoad { [super viewDidLoad]; ...

Edit text with in-line images on the iPhone

What is the best way of letting the user edit text with in-line images (or at least text with different background colours) on the iPhone? The UITextView doesn't support this. Edit: I just noticed that the e-mail client on the iPhone can edit text with images. So it's definitely possible. ...

Open a Link with selecting a UITableViewCell

Hi, what I'm trying to do is to have 1. a speakable text withtin the cell of a tableview (let's say "Google") 2. the ability that the user is able to select this row ("Google") and safari starts and opens the url http://www.google.de 3. if the user adds a new entry to the tableview, he should be able to enter the speakable text and the...

Model instantiation question when using Core Data

I'm slightly confused in one aspect of Core Data. That is, when do I use the rudimentary alloc/init routine vs created an object with core data and saving it into the current managed object context. I know that's a rather vague question, so let me give you an example. I have an application I'm currently working on that iterates through...

Rounded UIView with Shadow?

So using this link: http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview And this link: http://iphonedevelopment.blogspot.com/2008/11/creating-transparent-uiviews-rounded.html I came upon this implementation: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSav...

Why does Core Data create NSManagedObject's with properties but no accompanying instance variable?

Exactly as the title says, why does Core Data create instances of NSManagedObject with properties for each entity's attribute, but no accompanying instance variable? The problem is, I would like to use some of my 'Entities' in a typical alloc/init style fashion in some parts of my code. Not using Core Data's fetching/context to create/st...

Rendering Certain Character Glyph on iPhone

I am currently using the iPhone SDK to create an app that utilizes Indic scripts. However, the iPhone has issues with rendering certain glyphs in many Indic scripts. For example: प + ् + र = प्र or ਕ + ੍ + ਰ = ਕ੍ਰ When you type this on a Mac (or Windows) the computer will automatically render the three characters into the one gly...

What is something you wish you had known sooner about the iPhone SDK?

I'm interested in picking up some tips and tricks while learning about the SDK. What I am looking for something that you wish you had known getting started that would have benefited you now. ...

why is textFieldDidEndEditing: not being called?

I'm playing with writing my first iphone app; SDK 3.0. I've got a UITextField, and when text gets entered into that, I want to obtain the doubleValue from the text field and perform some computations and display them in a UITableView. The delegate for the UITextField adopts the UITextFieldDelegate protocol, and implements both textFiel...

UITableViewCell Custom Drawing and Animating when Entering Edit/Reorder Mode

I am trying to do something very similar to this post. Starting with Atebits Fast Scrolling in Tweetie post I have a UITableView subclass that does all of it's drawing in the drawRect: method of it's contentView. This works perfectly and is super fast. What I am trying to do now is animate the transition from editing to not-editing. ...

iPhone: Post data to php page

Despite looking at similar posts on this site and google, I just can't wrap my head around how to post to a php page from the iPhone. Here is what I want to do: I have a php script, say at www.mypage.com/myscript.php that I could post to normally by doing www.mypage.com/myscript.php?mynumber=99&myname=codezy This in turn will add a lo...

Grabbing articles from my Wordpress site then using that in a UITableView?

As the title says I'm currently trying to grab the posts from my Wordpress site and then load it into a UITableView so It can be viewed like that. How would this be done? Im assuming Im going to have to use XML but how..? I'd rather try RSS if I can? Or what ever way works! Thank you so much for helping! ...

UIControlEvents and subclassing UIControl

I have a UIControl subclass for a custom slider type control (one that behaves differently from UISlider). At the moment I use my own target and action variables to send a message to the target whenever the slider value changes. But this doesn't play nice with Apple's UIControlEvent constants. I wasn't sure if I should use these, and if ...

How can I create a variable sized UITableViewCell?

I can't seem to get the text to actually span multiple lines. The heights look correct. What am I missing? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"StatusCell"] autorelease]; ...

iPhone: How to encrypt a string

I would like to encrypt a string with AES 256 on the iPhone but have not found much via google. What I am trying to do is post some data to a web site as part of a game I am creating, but I do not want the user to be able to cheat by seeing how it is posted because it is plain text. So I want to post one encrypted string to my php page...

Force loading/unloading a view

How can I setup a view controller to refresh the fields in the view only it is pushed on a navigation controller and releases the objects when it is popped from navigation controller views. My goal is that for a view controller: Refresh display only when it is pushed on the navigation controller stack releases data when it is popped f...