cocoa-touch

What's the best way to implement HTTP Post chunked request on iPhone?

There's a really old thread from 2008 that mentioned NSUrlConnection is quite buggy and leaks a lot. Is this still the case? Is there any Cocoa Touch class that already implements the chunked upload or am I better off using the CF classes? ...

Download Request - iPhone SDK

Hello everyone, I am trying to create an app where the user clicks on a download link through a UIWebView and it will present a pop-up saying "do you want to download this file". I just don't know how to get the download request when the user taps on a download link. If anyone knows how to do this please leave a reply. thanks, Kevin ...

UISearchBar frame making x hard to press

I have a UISearchBar in my UINavigationBar that also has a button in it. When you click the search field the button gets a bit larger to accommodate text and the search field gets smaller to make space for it. Although this looks perfect as far as visual UI is concerned the x to clear the search field is almost unclickable. I am settin...

IPhone/IPad: How to get screen width programmatically?

Hi I'm wondering if there's a way to get the width programmatically. I'm looking for something general enough to accomodate iphone 3gs, iphone 4, ipad. Also, the width should change based on if the device is portrait or landscape (for ipad). Anybody know how to do this?? I've been looking for a while... thanks! ...

iPhone SDK - Big UITableViewCell

Hello everyone, I just wanted to know what kind of UITableViewCell are on applications such as "Mail", and how to set one up. They seem to have much more length for extra text and other objects. A good sample project or some code/reference link would get me started. Thanks, Kevin ...

iPhone SDK - Play Audio/Video through UIWebView

Hello everyone, I want to know if I could play a mp3 file or mp4 (video) file through an UIWebView by loading a simple url request. I have already tried sending the UIWebView to a video link (e.g. http://google.com/blah.mp4) but it will flash a quick QuickTime logo and show a black screen. However in MobileSafari it streams fine. Is the...

GameKit Server/Client

I have been trying to implement the GameKit Framework for bluetooth connection and want to use a Server/Client relationship to reduce lag and be able to distinguish between to connected devices. I found this thread and it is similar to what I am trying to do, but the code doesn't work for me. Here is what I have: Connect Method: -(IBAc...

IPad: can I deal with landscape, portrait orientations solely in interface builder? (non-programmatically)

Let's say we have a very simple view with just a single button. I'd like this button to flip when the user rotates his ipad. What's the simplest way to do this? Maybe interface builder has some kind of property I can set? I keep hearing something about autoresizingmask but I can't really find it in interface builder. Thanks p.s I unde...

problem in passing data when pop from one view to another view controller in iphone

hello I am having a application in which one view controller is pushed and when we pop from the pushed controller i do not get the value for the variable For eg consider there is A controller i n which i am havinh the int variable named Component now i push to B Controller on click event of button from A Controller ,When we are pus...

Truncate text in TTStyledTextLabel

Hi, I am using a TTStyledTextLabel in my project to parse the hyperlinks, it all works fine. The only problem I am facing is to truncate a long text - show ellipses if the text does not fit in the bounds of TTStyledTextLabel. In other terms, I need the same behavior as a UILabel which adds ellipses to indicate that some text is clipped...

a question related to state maintenance.

Hi all, I am new to Objective-C. I know how to save values using NSUserDefaults when the user presses the home button but it affects my application's performance. I want one method that saves values without affecting my application's performance. ...

iPhone UIView resources

Hi There, I have been looking for little more deeply UIView introduction resources, such as e-book, video or tutorials. Positioning, subclassing, frame, bouds, subviews, creating programmatically, loading from xib, both, etc. I didn't find good resource about it, I would like to hear suggestions ? Regards ...

how to get json data from iphone post request

Hi everyone, I am developing iphone App using JSON framework, I am calling a PHP script to update MySQL database on local server. Using these code: NSString *jsonString = [sendData JSONRepresentation]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; NSString*post = [NSString stringWithFormat:@"&json=%@", jsonString]; ...

want to use popViewControllerAnimated instead of popToRootViewControllerAnimated.

hi all, I want to use popViewControllerAnimated instead of popToRootViewControllerAnimated to move to the root view.I do not want to move to root view directly.so is there any method to move to root view by popping all previous views? ...

Why am I not seeing a loading screen in my application on OS 3.1, but I am on 4.0?

I have a loading screen that appears when my application loads on an iPhone 3G running OS 4.0, but not on an iPhone 3G S running 3.1.2. What could be causing this? ...

NSKeyedUnarchiver crashes after decoding an array

Hi, I have very frustrating problem. When I try to release NSKeyedUnarchiver object after decoding an NSArray, "EXC_BAD_ACCESS" error occurs. But when I don't release it or decode other object (e.g. NSString) everything go well. I don't understand it... For me, it looks like "decodeObjectForKey" method changes something in "decoder" obje...

when to alloc and initialize a view controller

Hi, recently I joined two Xcode projects together. To get this thing to work, I had to alloc and initialize my view controller. self.myViewController = [[MyViewController alloc] init]; But why? In the other project I have the same code. The sole difference is hierarchy of the different views. I added a new view to the top (beginning)...

assignment of property and allocation leads to retain count of 2

Hi, I had a look at instruments and I saw that the alloc increased the retain count by 1. So far everything clear. But the assignment of the class to my property also increased the retain count to 2. self.myProperty = [[MyClass alloc] init] Vs. MyClass *myCreatedVariable = [[MyClass alloc] init]; self.myProperty = myCreatedVariable ...

Cocoa-Touch: UIWindow not rotating some subviews

I have an iPad app that is set to start in landscape mode. From what I read, the UIWindow itself doesn't need to be rotated, instead it will apply a rotation transform to all of it's subviews when the device is rotated. My application has a UINavigationController which has the app's views, and above it a custom MenuBarViewController wh...

Managing multiple viewcontrollers with views displayed in a sequential way - should I use NavigationController?

Hello, I have a number of viewControllers (iPad) that manage different views presenting various screens to the user (start screen -> settings screen -> main screen -> details screen -> summary screen). Those screens are being traversed sequentially (as arrows above indicate) based on user interaction.One exception to that rule is that I ...