iphone

how to reload or refresh a view in iphone?

i have a uitableviewcontroller here is the .h file code @interface addToFavourites : UITableViewController { } @end and here is the .m file code #import "addToFavourites.h" @implementation addToFavourites - (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) { } return self; } - (NSI...

iPhone UIScrollView - how to get an image title.

Hi, I'm ATTEMPTING to learn UIScrollview using Apple's Docs and their sample code http://developer.apple.com/iphone/library/samplecode/Scrolling/index.html but something SO simple is escaping me. How do you tell what image is currently on the screen, so that if I selected one of the images in the horizontal scrolling view, how would I ...

Is is possible to use transparency in an iPhone app icon?

I created a 57X57 Circle-shaped icon (without shine) which has transparency outside of the circle-shape for my app. I can successfully install the app on Simulator and iPhone. It works fine, and looks great. However, can I submit an icon with transparency to Apple. Will they accept it? I can't find any apps which have transparency in th...

accessoryButtonTappedForRowWithIndexPath is not being called

Hi, I have my app perfectly working on the simulator and on the iPhone OS 2.2.1 device. But I as well have a device with iPhone OS 3.0 installed. And when I tap on a disclosure button, the accessoryButtonTappedForRowWithIndexPath method is not being called, however color of a disclosure button becomes darker. Has anyone faced such an i...

Is there a way to adjust volume in MPMoviePlayer Controller by program?

I want to increase or decrease or even mute the volume of movie player by my program instead of the buttons in Movie player. Is there a way to do it? Thanks ...

Name conventions for xibs

I've been looking at the sample code and sometimes Apple names xib files ClassNameView and sometimes ClassNameViewController. The ClassName is always a UIViewController or UITableViewController, which had me wonder what convention to use when naming a xib. I would think View as it's not really the ViewController, but curious on what the ...

How do I get my subclass of UIView to appear in Interface Builder?

I'm trying to share as much code between my common UIViews as possible by subclassing UIView. Is there a way to make this UIView accessable in Interface Builder? What's the best way to reuse hand-coded UIViews in Cocoa? ...

SoundEngine sample leaks

Hello! I use SoundEngine sample from CrashLanding sample Iphone SDK. When i run my project i found small memory leaks when sound engine initialize. Can anyone help me with this? ...

iPhone memory leak seems to be out of my control

Hello, So I'm making a very basic Twitter app (it's actually Presence 2 from the Stanford iPhone course that's on iTunes), when I decided I wanted to see if my application was leaking. So I ran Leaks and it found one right off the bat. But when I look at the stack trace the leak appears to happen in the main function when I call UIAppli...

Function that processes touches

Hi, I have an UITableView and I want to detect double touches on UITableViewCell. I wanted to create a method, that will be called from the main app cycle and will process touches. (i.e. keep in memory time of 2 last touches and if the time is less than 0.5 of a second than it is a double touch) Is there a better way to achieve this? ...

Reusable TableView header views

Hi, For performance sake it is usual to reuse UITableView' cells. Is there a way to do the same thing with TableView header' views? I am talking about the ones that are returned with delegate's method: - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section I tried to do the following which doesn't se...

Main loop in an iPhone app

Hi, I need to run a particular method every app loop. How can I add it to the loop? I didn't find any signs of this loop in the app delegate file and anywhere else? How can I do this? Thanks. ...

How to switch orientations from within a view controller that isn't the root one

I'm having troubles finding a solution to being able to change my orientation in a view controller that isn't the root one. For example, in the utility project which has a root view controller, main view controller for the main view, and a flipside view controller for the flipside view, the only place I can control the orientation is fr...

Possible to skin iPhone main (desktop) interface/background?

I know it's possible for jailbroken iPhones but does Apple provide any API for skinning the main mobile desktop interface/background? ...

self.title vs self.navigationItem.title

What is the purpose of the title property of UIViewController, can't the title already be set with navigationItem.title ? Both seem to work, I'm just wondering why there's this seemingly duplicated functionality. ...

How can I get rid of artifacts in my OpenGL ES iPhone app?

I'm using the Texture2D class from the CrashLanding sample code. I'm getting strange artifacts around my images in both the simulator and the phone. The artifacts are little gray borders around the textures. The borders are inconsistent and do not surround the entire texture. I'm using pngs. ...

Casting Objects in Cocoa touch

This sounds like a simple one but I can't find the solution anywhere. How do you cast objects in cocoa objective c for the iPhone? I'm trying to get the length of a string in an nsuinteger object like so: NSUInteger *phoneNumberLength = [phoneNumber length]; I get the warning initialization makes pointer from integer without...

Is preventing a UITableViewCell from being dequeued possible?

I'm using part of the Three20 library in a project. Specifically, a view that is essentially a table view with images going 4-wide across each cell to mimic the iPhone's photo app thumbnail view. I've noticed that the behavior is for each cell to be dequeued as soon as the bottom of the cell reaches the bottom of the navigation bar (wh...

What does @"some string" mean in objective-c?

I'm just starting out with iphone development and ran across some example code that used @"somestring" someLabel.txt = @"string of text"; Why does the string need the '@'? I'm guessing it's some kind of shortcut for creating an object? ...

Is anything "sensitive" stored in an iPhone Xcode project folder?

I want to open source one of my iPhone applications (that I've already published in the iTunes store) but I obviously don't want to expose anything "sensitive" like provisioning certificates and code-signing keys, etc. I'm guessing that stuff is merely referenced from the Xcode project folder (actually stored in my keychain elsewhere on...