Tag: objective c

po

When I do po [NSThread currentThread], I got {name = (null), num = 4} When I look to the left I see: Looks like it’s Thread number 6, not 4. Also what properties do we need to call to get that thread numbers anyway? [NSThread currentThread].number? Doesn’t exist though.

Is it possible to have a UIPanGesture and UISwipeGesture together?

I have a UIIMageView subclass and I am adding both a UIPanGestureRecognizer and a UISwipeGestureRecognizer as follows: self.userInteractionEnabled = YES; UIPanGestureRecognizer * panGesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(handlePan:)]; [self addGestureRecognizer:panGesture]; UISwipeGestureRecognizer * swipeUp = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(handleSwipeUp:)]; swipeUp.direction = UISwipeGestureRecognizerDirectionUp; [self addGestureRecognizer:swipeUp]; UISwipeGestureRecognizer * swipeDown = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(handleSwipeDown:)]; swipeDown.direction = UISwipeGestureRecognizerDirectionDown; [self addGestureRecognizer:swipeDown]; but when […]

sprite kit collisions: ignore transparency?

I am building a game with Xcode’s spritekit. Its a platform game and right now it functions well with flat ground pieces. I was wondering if it was possible to ignore transparency in the png for collisions. That is to say, If i have a ground piece with a curved floor and transparency filling the […]

videoMinFrameDuration is Deprecated

When I have updated Xcode from 4.6 to 5.1 `’videoMinnFrameDuration’ is deprecated in ios7 – (void)setFrameRate:(NSInteger)frameRate; { _frameRate = frameRate; if (_frameRate > 0) { for (AVCaptureConnection *connection in videoOutput.connections) { if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)]) connection.videoMinFrameDuration = CMTimeMake(1,_frameRate);

Detecting/Fixing Memory Leaks

I’ve finished coding my project, but then when I have submitted my source code in the client, it was tested, then memory leaks were detected. I have tested in Instruments using Leaks. What I am having problem with is in my AVPlayer and in my AVAudioPlayer and something in my AppDelegate. Should I find an […]

Convert RTF File into HTML in Objective C

How can I convert an RTF file into an HTMLformat ?? I have a text editor which saves the file in rtf format but I need to put the contents on my server. For that I need to convert the rtf file into that of an html.. I am unable to find any help with […]

What does this mean? “Writable atomic property 'fileManager' cannot pair a synthesized setter/getter with a user defined setter/getter”

Possible Duplicate: error: writable atomic property cannot pair a synthesized setter/getter with a user defined setter/getter I have a header file where I declare an atomic property, like this: @property (retain) FileManager *fileManager; Then I synthesize that in the implementation file: @synthesize fileManager; And then I write my own accessor for lazy initialization: – (FileManager*)fileManager […]

Iphone pixel distortion while zooming OpenGL ES content for Paint app

I have a strange problem with openGL ES. I’m working on a paint app for iphone [taking reference from GLPaint app] .In my code I’m using an imageView which contain outline image on which I am puting [CAEAGLLayer] paintView for filling colors. I am filling colors in outline image by drawings lines onscreen based on […]

How to run a command in terminal from my Cocoa app?

I want to use instrument to install the .app on my iOS simulator through my cocoa app. This is my first time developing a cocoa app and also NSTask. NSTask requires a launch path which in my case is irrelevant as this command can be run from anywhere. This is the command i want to […]

iOS drawing screen video capture not smooth

I am creating an application in which we can able to draw using our finger in an imageView , the same time we can record the screen also. I have done these features so far , but the problem is once the video recording is completed , if we play the recorded video the finger […]