iphone

Get fileSize of info.plist to prevent piracy

The title says it all. I'm trying to put anti-piracy code in my app. The previous answer to this (which I can't link to because of my member status - sucks) can be easily countered, since the "SignerIdentity" string can be looked for and replaced in the binary using a hex editor. Instead, checking the fileSize of the info.plist file a...

Overlaying views & positioning

I have a tab bar view, and another UIView which contains a button, which needs to be visible just above the tab bar. I have added another view which always sits above the current select tab's view, but can't figure out how to make it sit just above the tab bar ...

Generate different views using xml parsing

Hi, In the following XML, I can display controls (textfield,buttons,labels) dynamically on view according to XML tags... I am using NSXMLParser.. The XML is like this..... < page template="Login" pageIndex="1" pagetype ="Start"> < title>Sub Header < subtitle>Sub Header < content rowcount ="2"> < row index="1"> ...

Giving swip event to other control

I have a UITextView on top of a UIView. They are in a PageScrollView. The user can swipe anyhere outside of the UITextView and flick over the next page (view). I'd like the user to swipe on the UITextView and flick over the next view as well. The UITextView scrolls vertically when there is to much text, which the user can swipe and...

How can I securely free up memory by removing UIImageViews from the screen?

I have some UIImageViews that are nested in UIViews, which group them together. They're owned by an view controller. As soon as the -viewWillDisappear method is called, I want to remove those UIImageViews with their UIViews alltogether, so that the memory gets freed up. I call -release on the UIViews that contain the UIImageViews as sub...

Can't set the addressBook property of ABPeoplePickerNavigationController without crashing

I want to display an ABPeoplePicker with only people who have a geographic address defined. So I create an addressBook and remove people that dont have an address: addressBook = ABAddressBookCreate(); NSArray *peopleList = (NSArray *)ABAddressBookCopyArrayOfAllPeople( addressBook ); NSLog(@"There are %d people in addressBook", ABAddres...

How can I add an boolean value to an NSDictionary?

Well, for integers I would use NSNumber. But YES and NO aren't objects, I guess. A.f.a.i.k. I can only add objects to an NSDictionary, right? I couldn't find any wrapper class for booleans. Is there any? ...

How to tell if Cocoa Touch device can make calls?

I'm writing an iPhone application that provides a button to call a phone number. I'm using code like the following to dial the number using a tel: URL in the usual way: NSURL* contactTelURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", ...

How to get the screen brightness of iphone

I did some searches and found that if want to adjust the brightness, I need to use private framework and apple will reject it. If I just want to get the value of brightness(just get that value to display, not adjust it), is there a way which apple accept? ...

When to add Model (of MVC) to Interface Builder?

In the Stanford iPhone course CS193P assignment 2 (free online course), the step through says to add the model into the NIB via Cocoa Touch Plugin -> Controllers -> Object. Is this for initialization purpose only? Why can't I just instantiate and initialize my model in the awakeFromNib method within the controller class itself? ...

How do I write a desktop application that syncs with the iPhone?

For example, how would I write a program like senuti? Are there any libraries I can use for this? It would be ideal if I could do this in Python or .Net, but I'm open to other things as well. ...

Animating a texture across a surface in OpenGL

I'm working with the iPhone OpenGLES implementation and I wish to endlessly scroll a texture across a simple surface (two triangles making up a rectangle). This should be straightforward, but it's not something I've done before and I must be missing something. I can rotate the texture fine, but translate does not work at all. Do I hav...

What can be the reason that my UIImageView subclass doesn't receive any touch events?

I have made sure that all superviews of my customized UIImageView and the UIImageView itself have userInteractionEnabled = YES; Also in the nib all views and subviews have userInteractionEnabled = YES; But for some reason, these get never called when I click on the UIImageView: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent ...

iPhone memory consumption

I have developed an iphone application that opens to a tabbed view with the first tab being a uinavigationcontroller. Within that controller is a uiviewcontroller that contains a uitableview. There are 2 items listed in the tableview. When I select one or the other item, it displays yet another uiviewcontroller with dynamically generated...

How to extract UIBarButtonItem Icons from the iPhone SDK?

I'd like to extract the default UIBarButtonItem icons from the iPhone SDK. I imagine they're probably stored in the iPhoneSimulator platform as alpha-channel-only PNGs, but I've yet to find it. The one I'm looking for is UIBarButtonSystemItemReply. (For those suspicious that there's even a valid use case for this, I'm looking to use thi...

iPhone: How long will it take to search?

Here is a very and straight forward question: How long will it take to search an array of 200-300 strings locally? What about remotely? ...

What is an "misaligned image" in terms of Core Animation in iPhone OS?

Instruments tells that there are "misaligned images" which are animated by core animation. What does that mean? UPDATE: I've seen that in Instruments.app > Core Animation. ...

Can I load files from my computer in an iPhone app?

As part of the development phase of my iPhone app it would be really useful to load a file from my local machine, i.e. not from the application bundle. Is that possible? The purpose of this is so that I can build a version of our game, and then give it to one of our designers and they can edit a settings file locally on their machine an...

What kind of indicators do I have to look at in Instruments app and ObjectAlloc, to see if I have memory leaks in my app?

I guess that the "# Net" column is the most interesting, although I don't really understand what that's supposed to mean. Total number of currently allocated objects? It changes all the time, even if I don't do anything. Are there any good "rules of thumb" to see if there is an memory leak? ...

How to view property value in debugger

I have a UIViewController and would like to see properties such as myview.view.hidden. In another class where I declare an instance of UIViewController, I can assign and read the property through code but would like to know the value at various points. In the debugger console, I can't do "po myview.view.hidden" or "p myview.view.hidden...