iphone

Grid View as demoed in iPad

I'm trying to develop a grid-like application for the iPad. Has anyone seen a control that displays info in a grid? In the demos they use a grid-like layout in both the iBooks store and the pictures application. Specifically in pictures, they are displaying a dynamic list of data in a grid. I can work around it, of course, but I'd ra...

How can I get a custom sound to play with an Apple Push Notification?

I am trying to get a custom sound to play when my Apple push notification is delivered. The popup message displays, and the badge updates too, but I always get the default iPhone sound playing instead of my custom sound. Here's the JSON data I am sending: {"aps": {"sound": "sound.caf", "badge": 2, "alert": "Successfully registered ...

[iPhone] Why won't my UIImageView appear as a subview?

UIImage *image = [[UIImage alloc] initWithContentsOfFile:@"popup.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; [self.view addSubview:imageView]; [image release]; [imageView release]; The code sits within a UIViewcontroller object. It compiles fine but, when run, the subview does not appear to be a...

OpenGL-ES variable texture alpha (2D)?

I have a texture with transparency (the white triangle with that lighting information), and just can't make it's alpha variable. The drawing code, with the missing piece: //Place polygon vertices to the bottom left within the view. glLoadIdentity(); glTranslatef(centerX, centerY, 0); //Draw "diffuse" layer. glBindTexture(G...

Smoothing a rounded stroke in Core Graphics

I am creating my own UITableViewCells with a gradient background. I have all the logic and drawing worked out, but one thing I want to fix is the "chunkiness" around the corners of my custom cell: If you zoom in on the corners, you can see what I am talking about. Here is the code I a using to generate the cell: CGContextRef c = UI...

UITableViewCell variable height with multiple UILabels and IB

Alright so I have a situation here that is making me go crazy. I am loading a UITableView with a custom UITableViewCell. Now this cell has couple of UILabel's in it. so the order is: Label1 Label2 Label3 Label4 Now Label2 has a fixed height. Label1, Label3 and Label4 will need to change their height according to the size of string. I...

Bandwidth from headphone/microphone jack

I got interested in this after I saw SquareUp use the headphone jack on the iPhone to send credit card data. What's the average bandwidth of the headphone jack on the iPhone, average notebook, and average mobile device? Can it be doubled by sending different data streams on the different channels (left/right)? ...

How to save states using an application delegate

I have an application that displays some graphics based on the properties of an object. I want that the state of that object to persist when the application is started next. I know that the app delegate has a "applicationwillterminate" function which I can use, but the problem is I have no idea how to get a hold of a pointer to the objec...

How do you create a multi button confirmation on the iPhone?

On the iPhone, in the Calendar App when you press the "Delete Event" button a confirmation slides in from the bottom. Does anyone know of any example code for this, or is it just a short view presented modally with a custom background? If this is made using a custom view, do you know where I can get a background graphic the same as the ...

Random image display using rand()

Im just fiddling around with small apps, trying to learn the SDK and ObjC 2. Im trying to display an image randomly and I keep finding different ways up displaying a picture. I have uploaded the picture into the SDKs resources folder. Anyway, here is my code. Can someone steer me in the right direction. #import "randomViewControlle...

How to create a floating scrollbar like the one on the iPhone?

Hello everyone, I'm creating a finger friendly web app and am having issues with the scrollbar. Ideally I'm trying to recreate the iPhone's implementation where the scrollbar only appears when the user scrolls the content and disappears when the scrolling stops. Anyone got any pointers? ...

How to drag the url in WebView adn drop to a textlabel

Hello everyone I have a webview and want to drag the url on the webview to a textlabel. I know there is the option of 'Copy', but I prefer to do as the dragdrop function in normal computer. Is this possible for iphone app? Welcome any comment Thanks interdev ...

Can I use the "free" sound files from this website?

For not-free iphone applications, can I use sound files from this websites? Tintagel's Free Sound File Archive Can I download the wav files and use/play them in my app, without getting into any problems? I just need several very short wav sounds(shorter than 1 second). ...

How do I get a timestamp from an NSString date?

I have an NSString date (@"Mon, 01 Feb 2010 20:25:37 +0000") that I want to change into a timestamp so that I can better calculate how much time has elapsed from the current time. How can I change the NSString date into a timestamp value? ...

A way to do music in an iphone game with small file sizes

I'm making an iphone game, currently using openAL for SFX, we want to keep the game under 10 meg. iphone (through openAL atleast) only natively plays uncompressed PCM. what would be the most strait forward way of getting music from some sort of good compressed format (mp3, aac, ogg ect) into my game? is there some sort of decoder api?...

iPhone SDK: Need help showing a hidden tabbar

The attached code is a tabBar-based app with 3 tabs. It will help explain WTF I'm talking about. :-) http://www.4shared.com/file/213236157/ca831d43/TabBarPop.html The 1st tab is an embedded NavigationController with 6 views. Upon drilldown, the tab bar is hidden. With a button action in the 6th view, it's suppose to pop to the rootview ...

iPhone + In App purchase + access alert message buttons

Hello, I have implemented In App purchase in my application. While testing (with SandBox environment), when I tap on any locked feature, I get alert message from iTunes that "Do you want to buy xxx feature at $xxx ?", with Cancel / Buy buttons. I want to know that can I access these Cancel / Buy buttons, because I want to implement som...

IPhone Developer 'Standard Company' Program Question

Hi I'm considering between the 'standard individual' or 'standard company' program both for $99. My question is, in order for me to open the business program do I need to have the business registered legally (corp, LLC, etc?) or can I just put any business name i.e "sweet potato studios" or something and I'm good to go? (sorry for my ig...

Make a Custom Class Serializable in Objective-c/iPhone?

How can I make my own custom class serializable? I specifically want to write it to a file on iPhone, just plist and thee class is just a simple instance class, just NSStrings and maybe a NSUrl. ...

location of database created by the application

I have opened a database using sqlite3 in my application. When i run the application in the simulator, this database might be created and i'm playing with it. But now i need to know the location (to be accessed from ma mac) where this database is created. Surely it is not in the application folder as i'm not seeing it. I doubt it to be s...