iphone

What's a better way to display a handle for resizing a view on iPhone / iPad?

I want to display a handle at the corners of a UIView that can be used to resize the view. How can I display the handles floating on the top of everything else and still have a connection to and be in sync with a view? The solution I implemented before looks like this: I put the view into another view that shows the handles on top of...

Can a variable bu used 2nd time after releasing it?

Hello, I try to understand the memory management in ObjectiveC and still some things are a misery for me. I've got an instance variable: NSMutableArray *postResultsArray; when a button is clicked in the UI I create new array: self.postResultsArray = [NSMutableArray array]; then I add some objects to the array and when the who...

XCode vs VS2008 or how to work with a static library project on XCode

Hello. I've working with Visual Studio for a long time and now I'm working with XCode. On Visual Studio I can work with more than one project at the same time adding them to a solution (imagine a solutin with a windows application project and a library project). Now I have XCode and two projects: an iPhone application and a static lib...

NSMutableArray of Objects

First off I am very new to Objective C and iPhone programming. Now that that is out of the way. I have read through most of the Apple documentation on this and some third party manuals. I guess I just want to know if I'm going about this the correct way ... - (NSMutableArray *)makeModel { NSString *api = @"http://www.mycoolnewssit...

How to use a recorded sound as a ringtone

Hi, How is it possible to use a sound file (recorded by the App) as a ringtone? Can it be used in any other way out side of the Application as well? Thanks. ...

iphone,cocoa, how do you think on KVC and KVO in cocoa ?

if your app use this solution , do do you plan port the app to other platform ? for example, iPhone app --> Android or Backberry. I do not want user it , but some code is exist ... ...

Setting the "title" of a UIPopoverController?

I'm sure there's something obvious I'm missing here, but I know that popover controls can have "titles", a header area that has a line of text above the content view (e.g. the "Tools" popover in iWork). How can I add this in my own popovers? Thanks. ...

There is no attachment in the sent mail by iPhone

I'm trying to send a recorded sound file as attachment with MFMailComposeViewController. The sound file is OK. The picker shows the correct file name, shows the audio file icon as attachment, sends the mail, but there is no attachment in the result. I attached below the source of the sent mail. There is a "text/plain" content type par...

remove image from tableViewCell created programatically

Hello, I would like to move an imageView contained on a cell and it works but creating a new image at new position keeping old image (then two are shown). How could I remove old one?? used code: UIImage *cellImage = [UIImage imageNamed:(@"%@", showIconName)]; UIImageView *imageViewToPutInCell = [[UIImageView alloc] initWithImage:cellIma...

How can I test for NSAssert hit cases using iPhone's Unit Testing framework

(Let's assume that I have good reasons not to remove my NSAssert() checks in my code just because I'm also doing Unit testing.) In my unit testing code, I like to make sure that a NSAssert in my code hits (asserts) when I invoke it. I therefore use the STAssertThrows() macro when calling the code that does the assertion. The problem is...

How create UIImage from bytes ?

Hello, all! I need in UIImage created from my colors (for example, i need in image 1x1 pixel with black color). I've got array: unsigned char *color[] = {0, 0, 0, 1}; How can i create UIImage from this array ? I've try unsigned char *bytes[4] = {0,0,0,1}; NSData *data = [NSData dataWithBytes:bytes length:4]; UIImage *img = [UII...

Why I can't draw in a loop? (Using UIView in iPhone)

I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"dummy2.png" ofType:nil]; UIImage *img = [UIImage imageWithContentsOfFile:imagePath]; image = CGImageRetain(img.CGImage); CGRect imageRect; double x = 0; double y = 0; for (int k=0; k<someValue; k++) { x += k; y += k; ...

Load string with Html tags

I am loading a string into UIwebview. The string is a simple text coming from Database. What I want is that webview should show the text in Bold. How to add HTML <b> tag or any tag to this simple text coming from Database ? ...

How to get rid of a JQUERY APPEND GIve the following code...

Given the following lines of code which is using JQTOUCH: $('#customers').bind('pageAnimationEnd', function(e, info){ if (!$(this).data('loaded')) { $('.loadingscreen').css({'display':'block'}); $(this).append($('<div> </div>'). load('/mobile/ajax/customers/ .info', function()...

Does Objective-C have garbage collector on the iPhone?

Hello, I'm thinking of writing an app for the iphone. But I'm confused in regards to the objective-c language. Am I correct in saying that I have to do my own memory management? Is Objective-C a managed language such as C# and/or Java? Thank you! ...

addSubview like modal

How can I get a UIView to transition via addSubview like the presentModalViewController does? The available animations don't seem to do this. I would use the modal but I have a navigation bar at the top and don't want to disable it. Also, the modal overlays on the navigation bar. If there is a way to have it so the modal doesn't disa...

Personal iPhone application without paying ?

I want to develop a little iPhone application, just for my personal needs. I don't want to sell it or give it to anybody as it will not be useful to anybody. Can I have this application on my iPod/iPhone, without having to pay/suscribe/be on the Apple store ? ...

Update UIViewTableCell's background when accessory URL is clicked

In the tableView:accessoryButtonTappedForRowWithIndexPath: selector, I want to update the backgroundColor of the cell. I can get the UIViewTableCell using cellForRowAtIndexPath: but I'm not sure how I can update its background color. The code beliw doesn't seem to work. [_tableView beginUpdates]; cell.backgroundColor = [UIColor...

How load WebView with another URL when navigated through tab bar viewController

Hello, I have created window based application, root controller as Tab bar controller. WebView is being loaded in Tab bar interfaced ViewController's View.WebView is created using IB.WebView object declared in ViewController as per below. //ViewController.h @interface ViewController:UIViewController{ IBOutlet UIWebview *Webview; } @pr...

Basic question on retain/release semantics from Apple's reference library

I have done Objective-C way back when, and have recently (i.e. just now) read the documentation on Apple's site regarding the use of retain and release. However, there is a bit of code in their Creating an iPhone Application page that has me a bit confused: - (void)setUpPlacardView { // Create the placard view -- it calculates its ...