cocoa-touch

How can we show the preview image of the video in table view cell ?

I have a table view and if we touch a cell a video plays. I need to show the preview image of the video in the UITableViewCell. I have kept some dummy image in the cell at image place and remaining space ion cell is with some labels and buttons. I need the image preview of the video with play symbol on it. How can I make this ? Should I ...

Passing values from UIButton to an UIActionSheet

I'm trying to send an ActionSheet a variable from a button. I can't use the tag property because its being used for something else. I've declared myIndexRow as an instance variable and have: NSInteger myIndexRow = indexPath.row; [deleteButton addTarget:self action:@selector(showDeleteSheet:) forControlEvents:UIControlEventTouchUpI...

Auto-refresh UITableView Help

I am trying to refresh a UITableView with new cells every 30 seconds. My array contains 30 elements, and for every new item I add to my array, I want to remove the last cell in my table. How can I go about doing this? ...

Hiding UITableViewCell

Is there a way to hide a UITableView cell? I'm looking for some property or method I can invoke on the UITableViewCell returned by a synchronous cellForRowAtIndexPath() to hide it and make it unselectable by the user. ...

How can I programmatically position a view using relative points?

What is the best way to position a view relative to the size of its superview, when the bounds of the superview are not yet known? I am trying to avoid hard-coding coordinates if it is at all possible. Perhaps this is silly, and if so, that's a perfectly acceptable answer. I've run into this many times when working with custom UI. The ...

iPhone Settings app and keyboard control?

So I'm putting my app's preference settings into the Settings app. One of the settings is an edit text field (PSTextFieldSpecifier). When touched, the keyboard dutifully appears, I can make the edits, but when I press Return....nothing. Well, the editing is completed, but the keyboard remains. I see no way to make the keyboard go awa...

Invocation of ViewDidLoad after initWithNibName

It appears that ViewDidLoad() is sent to a ViewController only after its View is physically displayed (i.e. via NavigationController pushViewController), and not immediately after initWithNibName(). Is this a behavior I can rely on? I would like to get the chance to set the member variables of my view so that all the members are valid by...

Problems with UITableView when loading the view into the main window

I've created a sub class of UITableViewController named LoginViewController with the XIB file using XCode. Then I opened the XIB file with IB and set the table's style to grouped. Finally I wrote the following code: - (void)applicationDidFinishLaunching:(UIApplication *)application { LoginViewController *loginViewController = [...

Presenting a Popover From a Rect Problem

I have a UITableViewCell that has some labels and images that can be clicked. I want to present a popover whenever a user clicks on any part of the cell. How can I achieve this without interfering with the click actions of the labels & images? I am currently creating an invisible button ontop of some other clickable items in the cell an...

How to perform an action when UITableViewCell is in highlighted state?

Is it possible to perform an action when a UITableViewCell is highlighted? For example I have a UITableViewCell with clickable labels and buttons. I want to display a popover when the cell is highlighted/touched anywhere, so that the popover is shown without any interference with the labels & buttons. ...

How to troubleshoot deallocation of object in uitableview?

I have a table view with tall cells. About 300 in height. The cells are custom and have an associated nib. In cellForRowAtIndexPath, I access an object in an array using indexPath.row. The object has properties, which I assign to labels on the custom cell. This works fine for the first two cells. Once I scroll enough for the third ...

What is different when developing for the iPad versus the iPhone?

Hi, friends. What are the basic differences between the iPhone and iPad platforms that developers should be aware of? I am a junior developer at an iPhone development company, and I am still new to this. And also how does developing for iPhone/iPad differ from other platforms? ...

Using [self method] or @selector(method)?

Can anyone enlighten me as to the differences between the two statements below. [self playButtonSound]; AND: [self performSelector:@selector(playButtonSound)]; I am just asking as I had some old code that used @selector, now with a little more knowledge I can't think why I did not use [self playButtonSound] instead, they both seem...

Preload *.wav with SystemSoundID?

I am playing a wav file to give a little audio feedback when a button in my UI is pressed. My question is when you first press the button there is a delay (about 1.5secs) whilst the sound file "sound.wav" is loaded and cached. Is there a way to pre-cache this file (maybe in my viewDidLoad)? I guess I could do it by just playing it a view...

Exposing headers on iPhone static library

Hello guys, I've followed this tutorial for setting up a static library with common classes from 3 projects we are working on. It's pretty simple, create a new static library project on xcode, add the code there, a change some headers role from project to public. The tutorial says I should add my library folder to the header search pat...

How to get rect size of UITableViewCell?

How can I get the rect size of a UITableViewCell? I am trying to display a pop hover every time the user clicks on a cell, and would like the pop hover to appear centered on every cell: [replyPopover presentPopoverFromRect:CGRectMake(77, 25, 408, 68) inView:self.view permittedArrowDirections...

UITableViewCells loaded from NIB always nil

I'm trying to create a simple form using a UITableViewController as documented in the Apple Developer Documentation here: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html What I'm trying to do is located in the section entitled: "The Technique for Stat...

How to get total height of a UITableViewCell?

I have subclassed a UITableViewCell and within this class I want to get it's height. How can I achieve this? I have tried: self.frame.size.height but not sure if it is giving me the correct height value. ...

Cocoa touch - creating view template for iPad

Hi, This is kinda a hard question to describe. I'm just starting to make an iPad app. Now with the amount of real estate I have, I'm planning to have different but similar "views" to populate the space. (might be easier to think a newspaper site, where many of the columns are similar) I would like to create a "view template" so I can...

Auto-scroll UITextView after text append if scrollbar is at bottom

I am continuously appending text to the content of my UITextView and would like to auto-scroll to the latest update, only if if the UITextView has already been scrolled to the bottom. Any ideas on how this could be implemented? ...