When my user clicks on a cell I want the text to turn white:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
lblName.textColor = [UIColor whiteColor];
lblTime.textColor = [UIColor whiteColor];
}
This works fine, but when the user selects another cell, the previ...
I'm porting an archaic C++/Carbon program to Obj-C and Cocoa. The current version uses asynchronous usb reads and GetNextEvent to read the data.
When I try to compile this in Objective C, GetNextEvent isn't found because it's in the Carbon framework.
Searching Apple support yields nothing of use.
EDIT TO ADD:
Ok, so what I'm trying ...
I'm working up a game in XCode, and I want to add a helper application that uses the main application's various classes to build the main application's data files.
Specifically:
The main application is a card game.
I want a helper app that uses the classes such as card.m while it creates the deck.xml files for the deck of custom cards t...
umm So simple question here:
I have an instance of NSMutableArray declared in my header
NSMutableArray *day19;
@property (nonatomic, retain) NSMutableArray *day19
implementation:
@synthesize day19;
In my viewDidLoad
self.day19 = [[NSMutableArray alloc] init];
In the myMethod where I want to add objects to the array I:
NSObjec...
I'm trying to follow the (brilliant) instructions from here, but I have an instance of a class that I cannot modify by subclassing. Is there any way to override methods to an instance of the class only?
...
hi, I am working on apllication for iphone in xcode 3.1.
I want similar two images to disappear when touched one after other.
I have succeed in displaying two images on iphone simulator on touching
'PlAY' button.
Now i want that when two same images are 'touched' one after another,they should disappear.
Expect code in Objective C.
...
I am writing a facebook app for iphone, however when I send a request to post a comment I get the following error:
failed with error: Error Domain=api.facebook.com Code=210 "User not visible" UserInfo=0x5a986b0 {request_args=(
{
key = text;
value = "Test comment";
},
{
key = format;
value = XML;
},
{
key ...
I'm working on an iPhone project. I am getting an HTML fragment from an RSS feed and am attempting to load it into a UIWebView using the loadHTMLString method.
The string I am receiving from the feed is HTML encoded. When I pass it to the webview, it displays the decoded HTML, meaning it shows the tags along with the content of the pag...
I have an animation that I'd like to repeat 5 times and then stop. Is there a way to set the repeat count with the Blocks API?
My current approach is to kick off a NSTimer to trigger the animation X times. Is there a better way along the lines of setAnimationRepeatCount:
...
Thinking about learning Objective-C I've a background in Java and haven't thought about learning another language yet. The main goal is to eventually get into iPhone and iPad software development, but it's still early days.
My main question is: should I start with C or just jump straight into Objective-C since I'm already familiar with ...
Hello All,
I am working with audio in the iPhone OS and am a bit confused.
I am currently getting input from my audio buffer in the form of pcm values ranging from
-32767 to 32768. I am hoping to perform a dbSPL conversion using the formula 20LOG10(p/pref).
I am aware that pRef is .00002 pascals, and would like to convert the pcm va...
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']
...
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 seen some examples of the random int in Objective-C, but all people are complaining about the same number sequence every time the application runs. I have read about seeding the random number, but I am not sure what that even means.
How can a random number be generated differently every time, even after application has relaunche...
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'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 = ...
I see a lot of code like this in samples and in stubs that XCode generates:
if ((self = [super init])) {
}
I am not clear on the intention of double parenthesis in the conditional.
...
im looking to execute to execute command line commands from objective c. I know that popen can do this however I am have trouble trying to read and display what the data as an NSString. can anyone tell me how to do this or give me a native objective c function that is equivalent?
I probably should have mentioned im trying to write an ap...
How can I unselect a UITableViewCell when UITableView has scrolled?
...