iphone

iPhone - customizing WebKit

Hello, Apple has disabled the overflow CSS aspect in mobile Safari so it is not possible to scroll inside a fixed height div. This is quite annoying. While making an iPhone native app, is it possible to access WebKit settings to turn that feature on ? ...

How to modulate every texture unit in OpenGL ES 1.1?

I have two textures and a "blend factor", and I'd like to mix them, modulated by the current color; in effect, I want to use the following shader: gl_FragColor = gl_Color * mix(tex0, tex1, blendFactor); I'm using OpenGL ES 1.1, targeting all versions of the iPhone, so I can't use shaders, and I have two texture units. My best attem...

iPhone OS SDK: Possible to download SDK 3.0 w/o Xcode?

I recently downloaded the iPhone SDK 4 along with Xcode and neglected to install 3.0 and 3.1. I've since deleted the install package. I of course can re-download the whole package, but for future reference, I wonder if you are able to download individual SDK versions separately and independent of Xcode, like you would with almost any ope...

How to create a controllable flip effect (flip as far (and fast) as you drag) of an UIView

I have a card (a flashcard you could say) What I can do: On fingersweeping over the flashcard the card gets turned. It's happening by detecting touchesBegan and touchesMoved and then I do stuff like [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationCurve:UIViewAnimationCurveEas...

How can I dual boot my iphone or ipad to run a very simple custom os?

I am an experienced C/C++ programmer and have worked with assembly and many other programing language and I want to start a project as a learning process. I want to try and run a simple custom os on the iphone or ipad. What knowledge would I need to do this, and how does the iphone or ipad bootloader load the os and how could I modify it...

Automatically Sizing UIView after Adding to Window

Note: This may be a duplicate of Subview Doesnt AutoSize When Added to Root View Controller I have an iPad app that switches between different views in its main window. The view-switching code looks like this: - (void)switchToViewController:(UIViewController*)viewController { if (currentViewController != viewController) { ...

audio processing in iPhone

I am writing an iPhone application to apply filters to audio input and output the result in real time. I am new to audio processing but using audiounit, the correct approach? I found out how to output data using audiounit but couldn’t figure out how to capture input audio. Is there a sample application showing how to connect input and...

How to animate the hight change of an section header in UITableView?

I've implemented this method to return the section header height. However, when the height for the section changes, it happens immediately without animation. Is there an animation for that? - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { if (flatHeader) { return 50.0f; } else...

bigger UITableViewCellStyleValue1 detailTextLabel

I am trying to make a UITableView. Table cells are done in style UITableViewCellStyleValue1. When text in either textLabel or detailTextLabel is too long, it gets shortened with ellipsis... This happens for both labels; the problem really occurs, when both labels are too long. What is a preferred way to disable this or make detailText...

Why does my app crash when I add an row to the table view?

I'm adding a row like this, when a button is pressed. It must be the very first row in the first section: NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; I don't call anything else here. No -reloadData....

How do I use sqlite3 PRAGMA user_version in Objective-c?

I am trying to check the user_version of the sqlite DB. I have an admin tool to bump the version, but I don't understand the syntax of the pragma statement. I am expecting to test the value in an if-statement. Can someone provide a code sample? When I embed the pragma statement in my objective-c code, the compiler throws an error. ...

I get an "EXC_BAD_ACCESS" when I try to read a NSString...

Hello ! This is a (very) simplified version of my iPhone code : @interface x { NSString * name1; NSString * name2; } -init { name1 = @""; name2 = @""; } -(void) a { Foo * foo = [Foo alloc]; name1 = @"uhuh"; name2 = [foo bar]; // return a (NSString *) [foo release]; ...

Debugger in an iPhone app session not launched from tapping a springboard icon

I'm trying to debug an issue that only occurs when my iPhone app receives a push notification. The trouble is I can't figure out how to get a debugger, or even view any NSLog output, when my app is launched in this way. Xcode gives me a debugger and the gdb console when it launches an app for me. So how do I run my app in the debugger...

Updating CoreData xcdatamodel file troubles - attribute type change

I noticed several questions related to this topic go unanswered. Is this such a gray area that nobody really understands it? Here is my problem: I am a midway in the development of my app and the app has never been used ouside of my iphone simulator.One of the attributes in my core data structure requires a type change.Since my app has ...

Can I create a UITableViewController that inherits from a custom subclass of UIViewController?

I have common functionality that I need to access from all screens of my app: a right bar button item and associated action. So as not to repeat the code I would like to set this up in a custom UIViewController and have all my view controllers inherit from it. - (void)viewDidLoad { UIBarButtonItem *rightBarButton = [[UIBarButtonIte...

NSFetchedResultsController titleForHeaderInSection with formatted NSDate

In my Core Data app I am using a FetchedResultsController. Usually to set titles for headers in a UITableView you would implement the following method like so: - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[<#Fetched results controller#>...

Delay the call to the delegate method - mapView:regionDidChangeAnimated:

Whenever the user scrolls map or zooms in/out, this method gets called instantaneously. I want to delay the call to this method by say 2 secs. Is it possible to do that? ...

UIDatePicker hours are disabled

I have a UIDatePicker object and I am setting it up as follows but for some reason my hours field is disabled on the current date but minutes are not. Not exactly sure what I am missing, any help would be appreciated. UIDatePicker *picker = [[UIDatePicker alloc] init]; picker.date = [NSDate dateWithTimeIntervalSinceNow:DATE_MIN_SECONDS...

iPhone switching views without first view being reset

Heya! I'm making a role-playing game, and I want to have a Map View and a Battle Screen. With the possibility of other screens as well. I thought the best way to achieve this was to use multiple NIB files. When I prototyped this by have one view that creates content, switching to the next view, and then back, the content on the origin...

iPhone Simulator locks up immediately upon Build / Run

I'm having a problem getting my MacBook set up to build iPhone *apps* in xCode. The iPhone Simulator locks up and shows the "spinning circle" busy icon. I've tried everything I can think of, including resetting the simulator tried all of the different hardware options tried the two debug build choices in xCode. uninstalling the SDK a...