iphone

iPhone: Free developer certificate just for learning

Hi, i was wondering if i can get a iphone developer certificate for free? I just want to learn objective-c and iphone development. // No, the xCode iPhone Simulator don't have an accelerometer etc. g. ...

getSelection() for iPhone bookmarklet

I've done a bit of research but can't seem to find a definitive answer regarding getting the currently selected text via getSelection() in an iPhone bookmarklet. Is this still possible? It seems that from various searches there are a number of bookmarklets available that use a similar behaviour, but none appear to work for me. I'm simpl...

Event name when IBOutlet is assigned in the controller

I would like to run some logic in my Controller class once all IBOutlets get assigned. What method do I need to override in the Controller class to receive this event? Thanks, Rui ...

How do I make a side-scrolling iPhone app?

I am working on a side-scrolling iPhone app, and I have every resource, except the actual side scrolling part! How do I make an app so that it side-scrolls? To be more specific, I want the view of the app to scroll when a UIImageview(player) hits the right/left border of the screen. <:EDIT:> I am extremely sorry for all of this confusi...

How to switch views programatically

Hi, I've found many tutorials on switching views on the iPhone but none that quite match my needs. I wonder if you can help. I'm looking to have an initial view, A and on a button press unload A and switch to view B. I've seen the following, but I have reasons why I don't want to do it that way: Using a navigation controller - Once v...

Problem: AlertView must open subview but close it

I have a View that must open a subview if you click "Open Store" in a AlertView, but the subview is open, and after 1 sec closed again. Where is the problem?? This is my code: //my alertview UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"You must buy this item to use it!" deleg...

sample iphone code for delay and echo

Does anyone know where i can find sample code to apply processing to audio to simulate an echo or delay effect? I am currently using AVAudioPlayer to play samples and would like to layer the effects on top. All of the references I have seen so far are very generic and related to Audio Units. ...

Selector problem

I must have misunderstood something. I simply want to use performSelector: to call one of my own methods. Here I have the method declaration in the @interface: -(void)forceReload; FYI, all of this code is defined on only one type. And here is the method implementation and the calling method: -(void)forceReload { // code here... }...

Drawing a PNG Image Into a Graphics Context for Blending Mode Manipulation

I need to draw a series of PNGs into a CG context so I can blend them together: CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetBlendMode (context, kCGBlendModeOverlay); Currently I have my app working based on just drawing each image as a UIImageView and adding them as a subview to the view file via: [self addSubview...

SearchBar doesn't work when I type the uppercase alphabet

In my iPhone app, I have a SearchBar and when people type a keyword and click to search, the search result will show in UILabel. Everything works fine but when I type a keyword which starts with uppercase letters, the search does not work as it should. I know I have to do something but don´t know what. Anybody have an idea? ...

Using c library in objective c

I'm having trouble creating this c struct in objective c. typedef struct huffman_node_tag { unsigned char isLeaf; unsigned long count; struct huffman_node_tag *parent; union { struct { struct huffman_node_tag *zero, *one; }; unsigned char symbol; }; } huffman_node; ...

OpenGL ES view: how to orient it to landscape?

Looking for clues about orienting an OpenGL ES app in landscape, most information I found dates back from 2008, most of it refering to the early versions of the SDK. Apparently, back in the days, in the case of GL it was recommended to not rotate the view, but instead to apply the rotation as a GL transformation. Is it still the case wit...

'initializing' a property which is retained

In the iPhone objective-c world, I've seen this pattern everywhere and I use it myself all the time without really understanding what is going on: In Test.h @interface Test: UIViewController { NSMutableArray *testArray; } @property (retain, nonatomic) NSMutableArray *testArray; And in Test.m @implementation Test @synthesize testA...

Drawing a convex shape with CoreGraphics

I am trying to create a right triangle with a convex hypotenuse. Start with a square Cut off half of it diagonally such that what is left is a right triangle. Curve the hypotenuse inwards How would I achieve this with CoreGraphics? Should I inscribe an ellipse over half of the rectangle? ...

AddressBookUI like TableView for my application?

Hi guys, I've got a table-view with more than a thousand entries! That's just crazy, I know, but it makes no sense to split it into a tree. So what I'd like to do is to have an A-Z index and a search-bar just like in address book. Is there such a framework around that lets me set my own datasource that has nothing to do with people and...

Pause mpmovieplayercontroller programmatically - is it possible?

Pause mpmovieplayercontroller programmatically - is it possible? tnx. ...

Overriding drawRect: and pushing new offset CGContexts onto the stack

I have overridden the drawRect: in my UIView and I want to draw several tiles. I'm looping through them all and I have a separate function that draws each individual tile. The way I'm doing it now is I pass the tile's calculated CGRect to the function. At the moment, any drawing methods have to include the x & y offsets of the rect pass...

Determining value of NSUInteger

I'd like to view the value of an NSUInteger at any given time. I assign the value below: NSUInteger test = -1; Then try to view it in the debugger: (gdb) po test Cannot access memory at address 0xffffffff (gdb) p test $1 = 4294967295 Current language: auto; currently objective-c Far as I know, it is a value type. Where is -1? ...

Why doesn't Apple allow subclassing of UINavigationController? And what are my alternatives to subclassing?

I'm currently building a tabbed iPhone application where each tab's view controller is an instance of UINavigationController, and where every subcontroller of every one of the UINavigationController instances is an instance of UITableViewController. Ideally, I'd like to subclass UINavigationController so that the controller for each tab ...

touchesMoved behavior in iPhone and Simulator

The function touchesMoved behaves differently in iPhone and simulator. The repeating interval (refresh rate) of the function touchesMoved is much faster than simulator. Is there a way to deal with the difference? ...