I'm writing an iPhone application in Objective-C. I created a class (Foo.m) which I would like to be able to call a method in the controller (MainViewController.m) which instantiated it. How do I do this? Please provide an example. Thank you!
...
What's a good HTTP library for (desktop Cocoa and) iPhone? Should just have a good interface to the basics like HTTP headers, get/post values (request string creation, URL encoding/decoding), sync and async requests... preferably pure Obj-C implementation. NSURL* is somewhat lacking.
...
Hi everyone. I just completed my game. ( well not 100%). I am at the upload on facebook part. Could you guys share any resource or knowledge how to implement it please? after finish the game, i will have a button called: upload on facebook. click that and it will straightaway show the log in page for me to enter the username and password...
In this iphone app I'm trying to make it so that when you select a table cell it saves that action, pops the current view controller and calls the previous view controller (which is and always will be a TableView) to reload it's cells with new data.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexP...
after much debugging, I have determined that this code is ignoring the fast enumeration loop and blindly jumping to the end:
-(void)loadOutAnnotations
{
NSLog(@"entering Annotation enumeration Loop");
iProspectFresno_LiteAppDelegate *appDelegate =(iProspectFresno_LiteAppDelegate *)[[UIApplication sharedApplication] delegate];
...
HI everyone
I have successfully connect to facebook directly on the result screen of my game. But that's not what I want, I want to publish the scores right after I log in. Below is my code of publish the feed. But how do I trigger this function to make it run? I saw the example on Cocoa. But now i apply it on Cocos2D. There are few war...
I called function of one view controller class from other view controller in nib file using first responder before.But now I want to do it programatically.
Suppose,I have a 2 controller class named A and B.where B is root controller.I have a button(added programatically)named (Btn) in my A controller class.now I want to call functio...
I am using NSFetchRequest to fetch some items, which could be sorted by Popular, or Random.
Following the guides, I could sort the items by popularity easily using NSSortDescriptor.
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"popularity" ascending:NO];
NSArray *sortDescriptors = [[NSArray alloc]...
Hi all,
Is there any CoreFoundation handy way for checking a class's pedigree like isKindOfClass ?
Thank you in advance,
Vassilis
...
I am getting latitude and longitude using CLLocation. I want to know how I can get the address by using this latitude and longitude. Please help me.
...
Hi i'm a objC noob. I have a problem filling an NSMutableArray with objects.
for(id p in tmpArray){
Person *person = [[Person alloc] init];
person.usrName = p;
[persons addObject:person]; // after this line the persons
// array is still empty
[person release];
}
Persons is a property NSM...
I am trying to implement this button action, but the if statement is not evaluating to be true. I have a situation where the value in that "School" dictionary will not always have a website stored. For that reason i want to check, but what do i check against. If "nil" is not stored there when there is not a value, then what is?
-(IBAct...
Hi
I have this code inside an animation block, but when the code is executed, I can still see the UIImageView moving on the screen. Is there anything I have done wrong or the CATransaction setDisableActions does not work inside an UIView animation block?
[UIView beginAnimations:@"An animation" context:nil];
[UIView setAnimationCurve:UI...
I've added a NSPathCell to a table view:
- (void)awakeFromNib {
NSPathCell *pathCell = [[[NSPathCell alloc] init] autorelease];
[pathCell setPathStyle:NSPathStylePopUp];
[pathCell setControlSize:NSSmallControlSize];
[pathCell setAllowedTypes:[NSArray arrayWithObject:@"public.folder"]];
[[tableView tableColumnWithIdentifier:@"destin...
Hi,
i don't know why xcode cannot be hacked and become running on windows?
is xcode has another programming method?
also, i heared that iphone apps are made with objective c, so why this is not available in windows?
Thanks
...
when I scroll position end of UItableview the last UItableview row seems half. how can I show the last row fully and how can I detect scroll to last row?
...
In the following code:
_imageView.hasHorizontalScroller = YES;
_imageView.hasVerticalScroller = YES;
_imageView.autohidesScrollers = YES;
NSLog(@"scrollbar? H %p V %p hide %p",
&(_imageView.hasHorizontalScroller),
&(_imageView.hasVerticalScroller),
&(_imageView.autohidesScrollers));
I'm getting the error:
Contro...
I have a UIView that gets created and added as a subview dynamically, not in interface builder. Problem is the subview disappears eventually and all that is left on the screen is the objects that are defined in the xib that is being loaded.
It seems to occur once the retainCount of the subview drops from 3 to 2. I'm fairly new to iPhon...
Hi There,
I ve written an app that downloads files from a sever via http. The users will always be on WLAN when using my app. It downloads files of <10MB without any issues but the application just hangs for larger files.
Is there a best practice way to download large files or do i need to implement some form of chunking?
Any code sampl...
From the docs I was reading that @dynamic creates the accessor methods at runtime, while @synthesize will create the accessors at build time.
So let me guess: @dynamic saves some memory and code is kept smaller in memory pages? or what? and what other differences are there between these?
Would it be ok to say: "It's always a good idea ...