I have a text file that contains a list of coords to construct a path:
123,44
124,67
178,85
This file is included as part of the bundle. The question is how can I read the points from this file. In C++ there's fscanf, what about Cocoa?
...
I'm concepting an iPhone app that will require precise calibration to the iPhones accelerometer and gyro data. I will have to simulate specific movements that I would eventually like to execute code. (Think shake-to-shuffle, or undo).
Is there a good way of doing this already? or something you can come up with? Perhaps some way to gene...
Hi,
I have a large XML file ( around 1mb ) . i want to ask that if i parse the XML with NSXMLParser or KissXML/TouchXML.
which will take less interim memroy ?? ( the memroy took during parsing ) .
...
I have an app that crashes when i try to load it after it has been put in the background.
The first few times i put it in the background and relaunch it by multi-tasking (i.e double clicking the home button and getting the app in foreground) it works fine.
But if i keep putting it in background and keep re launching it after a few ti...
Hi,
Could someone share me some good idea of doing an accordion style(one which can expand and collapse on touchesEnded or some button) of display for text ??
I already have done in some manner...but lookin forward for a better version..would be nice if it could be animated too...
...
When dealing with UITableViewControllers, is there a way to set the height of an individual table cell other than this method:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
Basically what I am trying to do is insert a block of text into a table cell that would have a variable height. T...
How to Generate the random number from 0.5 to 1.0 .
...
NSMutableArray * val;
val = [[NSMutableArray alloc] initWithCapacity:15];
/*int outlineWidth = barOutlineWidth;
int outlineHalfWidth = (outlineWidth > 1) ? outlineWidth * 0.5f : 0;
*/
for ( Bar * obj in values )
{
// calcualte the bar size
float value = [obj value];
float scale = ( value / maxValue );
// shift the bar to t...
Hi Guys,
I want to sync the file into iTunes, I do not have any idea of this how to implement. I want the file which i had need to sync with iTunes programmatically. Can you suggest any idea how to implement this.
Thank you very much in advance,
Madan Mohan.
...
Hello;
I would like to be notifier each time a new window is created or destructed, at system level (not only the ones belonging to my application)
Do you have any pointer to achieve this?
Thanks in advance for your help,
Regards,
...
Hi
I'm using objective c and trying to output a value from a function. Apparently I am doing something wrong because I'm receiving an incorrect value.
This is my code:
-(float) getAngleBetween {
float num = 0.0;
return num;
}
and I'm calling it as follows:
float *theAngleBetween = [self getAngleBetween];
NSLog(@"Angle.. = %f", the...
I want to do something similar to UIAlertView, ie - without reference to any UIView or UIViewController, present a UIViewController on top of all windows using presentModalViewController.
Looking at the documentation I can't find a way in which this is possible!
In OS4, there is something like this:
UIWindow *window = [UIApplication s...
I'm working on an existing, large-ish codebase, and after upgrading the iOS SDK to 4.1 I am now seeing very strange behaviour. The crux of the matter appears to be a particular class that will no longer alloc - it is throwing a bad access in obj_msgSend, and seems to be the Class object on the stack that objc_msgSend doesn't like - altho...
Hi, i am trying to understand the concept of blocks. What i've read so far seems to be conceptually similar to anonymous functions in javascript. Is this correct?
...
As per the question, I'm looking to implement a video selector with different categories. This would be very similar to the BBC app in approach. I don't seem to be able to find anything that fits the bill though, has anyone got any good ideas for how I might be able to do this/an API freely available that does it. See example:
http:/...
I create a timer in my ViewDidLoad method of my view-controller.
NSMethodSignature *sgn = [self methodSignatureForSelector:@selector(gameLoop:)];
NSInvocation *inv = [NSInvocation invocationWithMethodSignature: sgn];
[inv setTarget: self];
[inv setSelector:@selector(gameLoop:)];
NSTimer *t = [NSTimer timerWithTimeInterval: 1./30.
...
This is how my code looks currently
NSTimer *delayTimer;
delayTimer = [NSTimer scheduledTimerWithTimeInterval:0.01
target:self
selector:@selector(longRunner)
userInfo:nil
...
I've got a UIScrollView covered with a custom UIView which desperatly needs to listen to all the touch events that happen inside of him.
At first, all I was getting was touchesBegan: and touchesCancelled: events. No touchesMoved:, no touchesEnded:. In fact, all the dragging gestures where being canceled by the above UIScrollView. This w...
Hi,
I am trying to make a circle image which rotates when the user drags the wheel
This is my code:
CABasicAnimation *rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:angleRadians];
rotationAnimation.duration = 10;
rotationAnima...
What is the equivalent to protected methods in objective-c?
I want to define methods which only the derived classes may call/implement.
...