iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.


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.

SOIL: 'Unable to open file' in C++ and OpenGL with Xcode

I’m trying to load a texture file with SOIL. I tried to load an image from the project files and I also tried to load an image from the file system. When I try to load my image from the project SOIL_last_result() gives me the error: Unable to open file But the application runs anyway. […]

Provisioning profile stored in XCode project file for iOS apps

I thought I’d figured out how to store XCode projects in source control – I only version the .pbxproject file and this seems to work great. But then I noticed the provisioning profile is also kept there. This doesn’t seem very good, I’m working remotely with another developer and we both have individual provisioning profiles. […]

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 […]

Multiple-line cursor movements in XCode

I’d like to map a key to move the cursor in the XCode up by ten lines. Of course, I want another one to move down too. The key mapping would ideally be something like ‘Control-Alt-P’. Is there a way to achieve this in XCode without resorting to Automator? Ashley has the answer below, the […]

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 […]

Build phase that create a Plist and copy it in resource bundle

I’ve made a ruby script that generate a Plist from data in other format (This script is inside the xcode‘s project folder). I’ve made a custom run script build phase that call my script: echo “Running xls Plister” cd ${PROJECT_DIR}/plistr ruby plistr.rb scriptExitStatus=$? echo “DONE with script: (exitStatus=${scriptExitStatus})” exit “${scriptExitStatus}” This script output the plist […]