cocoa-touch

iPhone: calling a parent/super method from a subview

hope someone can help me on this as been stuck for hours. I am trying to make a kind of picture book. I have a view which is my container and I add subviews to that by using addsubview. On the subview, I have swipe gestures etc that I want to trigger off method in the parent view. I worked out how to trigger the delegate but I cant get...

Transparency between UITableViewCells

Hi! I want to have transparency between UITableViewCells. Space between the cells. I user custom created cells and for setting a background i use this code: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CustomCell = @"CustomBookingCell"; currentBooki...

How to change UIView size in Interface Builder

In Interface Builder when I look at the size inspector for the view, it's showing 320x416 and it's grayed out so I can't change it. How can this be made editable? ...

Convert Interface Builder code to XCode

Is it true that everything you do in Interface Builder can be done programmatically? If your project uses Interface Builder to make the GUI, can that code be converted to native XCode and inserted into the project? ...

How to make keyboard appear at top of screen

When the user touches a UITextField a keyboard normally slides up from the bottom of the screen. Is there a way to make the keyboard appear at the top of the screen instead of the bottom? ...

Comparing time in NSDate

I am trying to compare the time from two NSDate objects but am getting the wrong answer. I think it is because when using the NSDate compare methods it is also including the date. I just want to ignore the date and compare the times. How can this be done? ...

Using a table view for entering data

With the regular table view touching a table cell will switch to another view. I have seen some applications that are using something that looks similar to a table view except touching a cell brings up the keyboard so that text can be entered into the cell. It looks kind of like a table view, but a little different. What are they using t...

Why not use Interface Builder

I have seen some people who refuse to use Interface Builder and prefer to make everything using code. Isn't this a bit tedious and doesn't it take longer? Why would people do that? ...

GHUnit for Integration Testing iOS Network functions

I have an iOS application (but this is just as applicable to an OS X app) that has async network access functions. Using GHUnit and without manually doing inner run loops, or synchronization of async operations, is it possible have a test method run an async operation and verify the results AFTER the async operation is complete. I don'...

Close a series of views in a for-loop [iPhone]

I need to close a series of views and don't wont to write code for closing them one by one. Here's a sample code to illustrate what I mean: //This is the method for placing the views. It's called at different times at runtime: - (void)addNotePic:(int)number { int indexNumber = ((110*number) + 10); UIImage *image = [UIImage imageNamed...

How to display multiple lines in a tableView cell

I have a somewhat long string that gets truncated when displayed in a tablView cell. I did this to make the table view wider: tableView.rowHeight = 100; How can I make the font smaller as well as wrap the text in the table view cell? ...

How does Apple make its controllers contain other controllers?

The Apple documentation gives the following warning regarding using View Controllers to manage part of a screen. Note: You should not use view controllers to manage views that fill only a part of their window—that is, only part of the area defined by the application content rectangle. If you want to have an interface compos...

multiple objects for a single index in an NSArray

Is it possible to store multiple objects for a single index in an NSArray? ...

how to change button name

how to push button and button name change and agin pus find same name in iphone ...

how to open an https site in iphone app?

i tried using startTLS method.but didn't obtain the result. ...

objective C Basic question

how do i set the size of tableview that is inherrited from UITableViewController like this @interface myTableViewController : UITableViewController { ............ ............ } ...

How to draw an NSString with an specific height on to an perfectly matching bitmap?

I have an NSString like @"Hello World" and want to convert that into an bitmap with exactly 20 pixels height. The width of the bitmap should match the width of the text. I know there are some NSString UIKit additions that can draw text, but I don't know how to draw the text with an bounding box of exactly 20 pixels height (text fits per...

Adding UIImageView's to UIScrollView

I am currently researching ways of adding several UIImageView's to a single UIScrollView. The UIScroll view will be 1.5 times the size of any one of the UIImageView's. I want to create a scrolling effect for browsing through some small images in an iPad application. Does anyone know how to achieve this? ...

How to obtain a CGImageRef from the content of an UIView?

I have an UIView where I was drawing some stuff inside -drawRect:. Now I need a CGImageRef from this graphics context or bitmap of the UIView. Is there an easy way to get that? ...

Can I set the scaleFactor of an UIView when I want my drawing code in -drawRect to not waste too much memory?

I am drawing something into -drawRect of an UIView, and in this case I really want a certain amount of pixels. With the retina display, my view has a scaleFactor of 2.0 and when I draw something that is supposed to be 10 pixels heigh, it's actually 20 heigh. Is it okay to set the scale factor back to 1.0 to get a 1:1 mapping between poin...