iphone

UIScrollView - Figuring out where the scroll will stop

I'm trying to figure out how to calculate where the scrollview will stop when a user does a swipe gesture and the scrollview goes into deceleration. I'm trying to use the delegate functions, but I can't accurately figure it out. Please help! - (void) scrollViewDidScroll:(UIScrollView *)scrollView; - (void) scrollViewWillBeginDeceleratin...

iPhone reachability sample not always working

Hi, using iphone sdk 3.1.2 I use the following code to monitor whether my app has an internet connection. I need to either get notifications or poll so my app always has the latest status. hostReach = [[Reachability reachabilityWithHostName: @"www.google.com"] retain]; [hostReach startNotifer]; then when i get a notification i use th...

how to programatically start 3g connection on iphone?

hi, using sdk 3.1.2 how to programatically start 3g connection on iphone? do i need to use socket api? ...

Two UITableView in one UIViewController problem

I considered to use two UITableView in one UIViewController which is also do data source for them but encountered the problem that while both tables visit numberOfRowsInSection only one visit cellForRowAtIndexPath at the start and both tables contain empty rows. Do someone know why this happens? ...

Is VBO effective for drawing 2D animation-sequence-sprites in iPhone's MBX chip?

VBO is effective complex geometric 3D object. But I think plain DrawArray with transformed vertices/texcoords are better for 2D animation sequence sprites. Because there are a only 4 vertices for a box. With VBO, those vertices duplicated for each texcoords, and draw function should be called many times. But with DrawArray, just pushes...

HTTP Live Streaming for IPhone

I'm folowing Apple's proposal in http://tools.ietf.org/html/draft-pantos-http-live-streaming-01. Trying a dummy HTTP Live Streaming to my iphone, I wrote a webservice with Django corresponding to a .m3u8 file. I'm begining the response with #EXTM3U #EXT-X-TARGETDURATION:#10 #EXT-X-MEDIA-SEQUENCE:#0 I then write the URLs of the segmen...

How do I implement audioStreamDesc.mSampleRate = audioStreamDesc.mSampleRate * 1.2; into my code?

I'm trying to make a sound mixer iphone app, but I can't seem to do speed control. I've looked over the posts, and this seems like the thing to do, but how do I implement it into the program? ...

Detecting a user's currency in Objective-C for iPhone SDK... where to begin?

Hi y'all! I have an app that deals with currency, but obviously I'd like it to be multilingual. Where do I go about finding the value of what the user's default currency is? I presume it's as easy as a line or two of code, but I may be wrong... Jack ...

Resizing TableViewCell when TableView is in grouped mode

I have a TableView in my application and I've created a centered label inside TableViewCell that I'm placing in the view. When TableView is in standard mode everything is ok and the label is really centered. However when I change the mode to grouped then the label is displayed slightly to the right. I suspect this is because in grouped m...

UITableView how to "dim" the actual table when UISearchbar gets focus?

Many of the table searches I see actually dim (change alpha?) of the actual tableView when the search bar gets focused. I am trying to implement this. When I overload - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar I am trying to do something like self.tableView.alpha = .5f But it is changing the alpha of the actu...

NStimer -- what am I doing wrong here?

I've been using an NSTimer successfully, but am now having trouble with it. Undoubtably something stupid. Appreciate another set of eyes. Running the debugger, I see that applicationDidFinishLaunching is called, but trigger is never called. -(void) trigger:(NSTimer *) theTimer{ NSLog(@"timer fired"); } - (void)applicationDidFinishL...

Is there a callback to use to tell when the user's location is available

I'm after a callback or protocol that will notify me when the user's location is available. So that when a user's location is found I can zoom into where they are. What can I use to do this? I was thinking there waas something in CoreLocation that could do it, but I can't find how to do it. [Update] I've implemented <CLLocationManager...

In app purchase subscription vs consumable

I'm making an app which will allow the user to purchase either a subscription or consumable which allows them to access data on a monthly basis. Once the new data for the next month is available they will download that and the previous data is invalid and actually illegal to use so it will be removed. So I'm not sure which to choose. A s...

EXC_BAD_ACCESS upon simple iPhone app startup

Background: I'm trying out the "HelloPoly" assignment in the CS193P course. I've created my .xib file, and a custom Controller class. I haven't fleshed out any methods - I've only allowed IB to write the class files into xcode. Problem: Every single time I startup the application, it bombs out. When I run gdb I see it's an EXC_BAD_A...

Scroll text in a view with navigation controller

hi everybody! i'm italian so sorry for my bad english :D so... i've this simple program: a navigation controller controll two view (the first view and another inside a UIViewController). I want to scroll the text (and images) in my second view. how can i do that? have i to use uiscrollview? how? i'm a newbie :P this is my program: http...

TouchesMoved with Button?

Is it possible to use the touchesMoved function with buttons instead of UIImageViews? ...

UITableViewCell subclass not showing correct size

I have a nib file for a UITableViewCell subclass I made, it's height is set to 25 in the nib, however when the application loads, this is not the case. It loads to the default size. Here is my code for the implementation of the cell. // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)table...

Exact Timer wanted!

Hi All, I am looking for this for weeks now: My app needs a metronome like function and I did it with a thread (copied and adapted from Apples Metronom example) but the timing is miserable. I know that the timer ressources are not accurate but I cannot find another feaseable technique. And I need just short "beep" sounds so tackling the...

Ipod Library Access and subview removal in this code

I'm a 14 year old modifying an apple example code(my version can be found here for a school project, and I tried to put in ipod library access(It doesn't actually do anything yet, it's just supposed to show the access pop-up thing) and I tested it on-device, but it doesn't work. XCode shows no errors, but it doesn't work, even OD. Any re...

UITabBar in Landscape with UITableView in Portrait

I am creating a large line graph, composed of several custom UIViews showing different sections of data within UITableViewCells, to facilitate easy scrolling of the graph. The problem is, that since UITableViews don't support horizontal scrolling or more than one cell in any given row, I can only correctly view the data if, while the vi...