Is there a simple way to preload all the cells in a uitableview?
I need to do this in order to change whether or not all the cells are checked. If I just use cellForRowAtIndexPath, and the user say unchecks all the cells, and then checks a visible cell and starts to scroll again, either the selected cell gets deselected or the newly loa...
I want to pass cordinates to default blue blob of mapkit.but it gives error? how do i show blue blob at my desired location?
...
I have a header file variable.h where i declare all my global variable.Then i add this header file my wordgame.m .Here i have
several function .The problem is that when i initialize some global (int) variable in a function other function do no get the initialized value.Other function always displayed value(=100)
for these variable.Even ...
I am using avaudioplayer in my app. on viewwilldisappear i want to pause/stop the sound and on viewwill appear i want to play sound again.how do i do this? i'm using this code on viewWillAppear:-
if(self.TickPlayer)
{
[self.TickPlayer play];
}
if(self.TickPlayer.volume<0)
{
self.TickPlayer.volume=1.0;
}
and this on viewWillD...
I am not a fan of the following construction
if (self = [super init])
{
//do something with self assuming it has been created
}
Is the following equivalent?
self = [super init];
if (self != nil)
{
//Do something with Self
}
...
ruby code(irb)
irb(main):001:0> ary = ["AAA", "BBB", "CCC"]
=> ["AAA", "BBB", "CCC"]
irb(main):003:0> ary.index("AAA")
=> 0
irb(main):004:0> ary.index("BBB")
=> 1
irb(main):005:0> ary.index("CCC")
=> 2
irb(main):006:0> ary.index("DDD")
=> nil
I want to do same in objective-c(NSMutableArray).
...
hi developers, how can i get current focused window id using objective c, the return value should be an int, help is highly appreciated! I just need to get the following line working
CGImageRef windowImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, winNum, kCGWindowImageBoundsIgnoreFraming);
but no matte...
I want to use push notification in my app.i want to know that do i need to include certificate in my app to get device token or i just need to install certificate in key chain and implement only the methods which are described in PushNotificationGuide? actually I'm a bit confused about whether i integrate certificate in my app or not.I j...
This function is not executed well.
-(void)sampleItemA:(NSString*)a itemB:(NSString*)b itemC:(NSDate*)c{
NSLog(@"A");
NSArray* ary = [[NSArray alloc] initWithObjects:a, b, c, nil];
NSLog([ary description]);
NSLog(@"B");
}
log
[Session started at 2009-11-07 20:46:10 +0900.]
2009-11-07 20:46:19.170 xxx[2374:207] A
Wh...
i have two dates i want to compare which one is greater date how do i do this in objective-c?
...
I want to use Core Data as a cache for a larger dataset on a database server.
Not all data will be in memory.
When thinking about this further 2 questions came to mind:
Can faulting (for example for 1-n relationships) be used with the in-memory persistent store, and if so, how do you a catch a fault firing?
A Core data managed object...
Coming from an Eclipse / Java background, one of my favorite features is the ability to quickly stub out all the methods required by an interface. In Eclipse, I can choose 'Override / implement' from the source menu to generate stub methods for any method of the Interface.
I'd like to do the same thing in Objective-C. For instance, if...
Ok I think my understanding of properties in objective c may not be what I thought it was.
In my program I have a singleton that contains my class.
In my class during the init I assign a value from the singleton to my property.
I then assign a value to a property of that property.
However it does not keep the value and when I do a co...
Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button?
For instance, at the moment I have a UIView (A) with an object at the top and an object at the bottom of the screen and nothing in the middle. This sits ...
I am creating a budget application in iPhone. Budget for personal incomes & expenses.
Client's need is
I want to see line graph ( like stock market line report ).
Red line for (monthly / weekly / daily) expenses
Green line for (monthly / weekly / daily) incomes
The question is HOW?
Till now I have never faced this kind of require...
I'm writing an app that has a custom, transparent NSWindow created using a NSWindow subclass with the following:
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backin...
Let's say I have an NSImage that's 100x100. I also have an NSImageView that's 50x50. Is there a way I can place the NSImage at coordinates inside the NSImageView, so I can control which part of it shows? It didn't seem like NSImage had an initWithFrame method...
...
I need to simulate how my application will look when a user is driving around for a demo. I have a MKMapView, how can I simulate the look of a user driving around which will use the map.userLocation functionality, which obviously will not be available in the demo.
Thanks!
...
In Objective-C, I usually see methods that return a dynamically typed object defined as follows:
- (id)someMethod:(id)someParameter;
I know that I can do this, though, as well:
- someMethod:someParameter;
Interestingly, I see the latter convention in more core-level foundation classes, but everyone else seems to use the first. Sinc...
is self not completely interchangeable with this in C++?
It seems to work with message passing ( [ self sayHi ] would work within any method there ).
I don't quite understand why I can't use self to access private members of an object (in the example below, I show I can't use self.width)
#import <Foundation/Foundation.h>
// Write a...