Looking for the most succinct way to convert an array of dicts to an array composed of a certain attribute of each dict. eg.
[ { name => 'Visa', value => 'VI' }, { name => 'Mastercard', value => 'MC' }]
=>
['Visa', 'Mastercard']
...
I have a paging UIScrollView in which the user pages horizontally through images, like Apple's Photos.app. That works, but now I'm trying to add rotation support.
I've got the view rotating OK and have managed to set the contentSize, bounds, and subviews' frames properly to adapt to the different orientations. So before and after the ro...
What is the best way for a view added via presentModalViewController to communicate its dismissal with the class which invoked the call?
In one of my methods, I use presentModalViewController:animated: to popup a scoreboard where a player enters their name, then clicks OK. Everything is working fine with the scoreboard, but when I use d...
We are trying to submit a new binary version with in-app purchase into the Apple iphone app store. However, we are getting the following error when trying to do so:
"The key CFBundleVersion in the Info.plist file must be a period-separated list of positive integers."
We believe that the problem is that svn is appending an 'r' for the r...
I have a view with buttons. This view sits in a tabbarcontroller. I have just gotten an issue which appears in the device, but not in simulator. If I switch to another tab and back again the view is redrawn and my buttons come out doubled. I know this because the borders are thicker and the buttons with variable text overwrite each other...
I have narrowed down this error (which crashes my app):
-[NSConcreteMutableData release]: message sent to deallocated instance 0x6eaed40
to the following code:
emailData = [kmlDoc dataUsingEncoding:NSUTF8StringEncoding];
But, I cannot figure out why this error is being caused? That line is just setting a very large string to an NS...
Hi,
I'm working on mobile web application targeted toward Webkit-based browsers on devices such as iPhone, Android, etc. I've noticed that when and iPhone switches from Edge to 3g or vice-versa a new IP address is assigned to the device, which makes sense.
The problem is that I'm connecting to a web application sitting on two Windows S...
I am working on my universal app (4.0.1 sdk) and I am unable to get it to run on an iPod touch. It works on iPad, and on both the iPad Simulator and the iPod simulator When I try to launch the app on the touch, my main gets called and I can stop at a break point (I assume this means the provisioning and certs are right) but nothing after...
Hi guys.. I'm having a bit of trouble accessing what I think element should be in my array. I am getting results from a webservice and trying to make sense of them.
The service returns an NSMutableArray called GroupOfHouses.
I have set up my code to set an array as such
NSMutableArray *myHousesGroup;
Then populate it
myHousesGroup ...
I'm curious, can anyone describe the internal structure of a .xib file used by Interface Builder?
...
I'm trying to place a circular image on an iPhone view and then consume taps inside the circle but not outside of it. The problem I'm running into is that when I place a UIImageView on the screen view in Interface Builder, I seem to be constrained to a rectangular shape. I tried using an image of a circle with the area outside the circl...
Hi,
I have created a "normal" app - initially without cocos2d. Now I need cocos2d in this app. So I added all the frameworks that are included when creating a cocos2d app and just copied the cocos2d group from another project by dragging it to my project.
For the init for cocos2d I get the application's window in an ivar of the ViewCon...
Hi -
I have an an iPhone app I'm building. The first two screens are navigation controllers but starting from the third screen on, I want a UITabBarController with three navigation controllers inside. I'm able to code the UITabBarController by hand (not using interface builder) and all works fine except that when I transition to the U...
I'm trying to find out how to set UITableViewCell background color to the "grey" used for example in the official clock application for alarm cells.
I'm unable to find that out in system colors nor elsewhere.
How do I set this color?
...
I discovered that my drawRect is being called more than once. Unfortunately this had the unfortunate side-effect of double-drawing everything because all my subviews are drawn in drawRect (I'm s strict atheist w.r.t. Interface Builder).
What is the best way to deal with a multiple calls to drawrect? A flag to check if it's being called ...
I've been going through some open-source code for a Twitter app, and came across this:
(in the OADataFetcher.h) file:
OAMutableURLRequest *request;
NSURLResponse *response;
NSError *error;
NSData *responseData;
(inside the 'fetchDataWithRequest:delegate:didFinishSelector:didFailSelector:' method) in OADataFetcher.m:
responseData = ...
Hi,
I have a CATextLayer as a sublayer for a UITableViewCell's contentView's backing layer. I set the foregroundColor of this layer to [[UIColor blackColor] CGColor]. I also have this:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
[CATransaction begin];
[CATra...
Hello all. i trying to understood class hierarchy. which are the sub class of NSObject. are there any graphical representation?
...
I've got an activity indicator set up to start spinning when a file is getting downloaded from the internet. The file is downloaded asynchronously, and it also makes a request to continue downloading should the user send the app into the background or start another app. However, upon resuming my app, the activity indicator is no longer s...
How can I unselect a UITableViewCell when UITableView has scrolled?
...