iphone

How to Darken an Irregularly Shaped Transparent CALayer on the iPhone?

I'm putting an image into a CALayer that could be irregularly transparent: theCardLayer.front = [CALayer layer]; theCardLayer.front.contents = (id)[cardDrawing CGImage]; In other words, it might be a square filling the layer or it might be an octagon that leaves the corners see-through. I want to sometimes darken this layer, but wi...

What is the best way to transfer an object between two iOS devices running the same app?

I'm trying to give my iOS app the ability to transfer an object to another iOS device running the same app. The object is on the order a few thousand KB of memory. Does anyone have a suggestion as to how to do this? I am considering using FTP, but that seems a little messy. Does anyone have any suggestions on possibly using GameKit? ...

How much sense does this block make, in Objective-C?

From the docs: int (^Multiply)(int, int) = ^(int num1, int num2) { return num1 * num2; }; int result = Multiply(7, 4); // result is 28 It only looks complicated - the same thing could be done with an function, or not? What's the real point here in this example? ...

Printing userInfo of an NSError from Core Data throws EXC_BAD_ALLOC

I'm using this code (from http://stackoverflow.com/questions/1283960/iphone-core-data-unresolved-error-while-saving/1297157#1297157) to print a more detailed description of an NSError object: - (NSString*)debugDescription { NSMutableArray* errorLines = [NSMutableArray array]; [errorLines addObject:[NSString stringWithFormat:@"Faile...

MPMoviePlayerController pause in pre and post ios4?

I have a bunch of apps that play video with an overlay. I built it originally in iOS 3.0, and used the undocumented but functional -[MPMovieController pause] on my own set of controls. Now that iOS4 came along (and having tried to submit a new app with the same code), I've been rejected and I've got to update all my old ones. The frustr...

Generating a class diagram for iPhone app

Is it possible to generate a class diagram for an iPhone application. I wanted to see the flow of the code in a huge application. ...

Logging into and communicating with a server from an iOS app...help!!

Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will let you login, and get pictures off from a server that will then be downloaded for display and review on the local device. I need to get some pointers on the correct...

Simple way of using irregular shaped buttons

Hey everyone, I've finally got my main app release (Tap Play MMO - check it out ;-) ) and I'm now working on expanding it. To do this I need to have a circle that has four seperate buttons in it, these buttons will essentially be quarters. I've come to the conclusion that the circlular image will need to be constructed of four images, ...

How to call a method in a sub UIView?

hi, i have a uiviewcontroller named MainViewController, i add a subview in it (name:DetailView) in viewdidload event. when i press the a button in mainviewController i want to call a method in subview, writeSomething. //DetailView is a subclass of a UIView. in Mainviewcontroller: - (void)viewDidLoad { [super viewDidLoad]; ...

extracting reusable UI parts in cocoa touch - views vs controllers - how should it be done?

Let's say I am designing an iPad app that presents user a screen. The screen contains several "controls" that for the sake of this example can be simple labels with +/- signs that increment/decrement integer value presented by the label, making sure that the value doesnt exceed max number defined for each control (numerical up/down contr...

Can I have a timer running during iOS 4.0+ multi-tasking?

So I have just managed to build a timer on my iOS app I'm working on, and it works great! Except for the fact that the whole point of the timer is to be able to multi-task with it. Meaning, I want to be able to be in my app, set a timer, hit go, have it start ticking down to 0, and allow users to switch over to another app, and do that ...

UIImageView and XML Parsed Data

Hello people that are way smarter than me, I got two xml elements, one is title and the other URL of image. I am trying to show both the UILabel and UIImageView. My problem is the image not showing up. Here is what I have done so far... If I pass _track.consultant_pic into an UILabel I can see the string (http://mysite.com/ted.jpg) in...

UITableView, reloadData reload the cell but does not resize the table

I have this strange behavior, when I update my dataSource ofr my UITableView and call the reloadData thing, the cells are updated but the size of the table dosen't change. I really do not have any clue... can some one help? ...

Linking to the itunes store.

I would like to add buttons which allow the user to buy music on itunes. When the button is selected itunes opens to the specific track or album and when the user is done it returns to the app? Can this be done inside the app or will it open itunes separately? How does one do this in the code? Built in methods? I am also wondering how...

How can I capture screen with sound in iphone, then convert to video and email?

Similar to "Talking Tom Cat" app. How can I possibly achieve this? Are there any API out there I can use? Sorry for this noob question..... >_< ...

playing streamed content in an app

I have a number of music tracks which I would like the user to be able to preview a small clip of each. These tracks are on a server. How is media streamed into the app and which player is used? Can a custom player be created to play the clips within the view, without e.g. quicktime player opening? Thanks ...

xcode defining variable problem

Hi there Can someone please explain to me why my variable called activity is 0 when defined as a float, but displays the correct value when defined as an int? I have another float which is used for pretty much the same thing but works perfectly! @implementation AppPrefsViewController float age; int activity; ... -(void) updateAValues...

How can I get a full-sized UINavigationBar titleView

I am trying to add a custom control as the titleView in a UINavigationBar. When I do so, despite setting the frame and the properties that would normally assume full width, I get this: The bright blue can be ignored as it is where I am hiding my custom control. The issue is the narrow strips of navbar at the ends of the bar. How can ...

Cheapest way (platform/language) to implement a RESTful web API for an iPhone app?

I am developing an iPhone app and would like to create some sort of RESTful API so different users of the app can share information/data. To create a community of sorts. Say my app is some sort of game, and I want the user to be able to post their highscore on a global leaderboard as well as maintain a list of friends and see their scor...

UINavigationControl with Image View as root, table views thereafter

All, This is one that should be simple, but since I'm rather new to the xcode IOS 4 developement, I gotta ask: What I need: an Image View with a button that will then display a series of linked table views. This screams (to me) a UINavigationController where the first view is NOT a table view, but the UIImage view. I cannot get this...