xcode4

UIColor conversion from RGB to HSV , set brightness to UIColor

…衆ロ難τιáo~ 提交于 2019-12-06 05:22:00
In my app I am trying to draw with different colors. I have my own color picker, but I want to add to this picker slider for color brightness. For understudying : I choose a color which is displayed somewhere in view as background color and to this color I want add slider which will slide from 1 to 0 and change brightness of the color and displays the color in window. Therefore I want to ask if there is any possible way how to convert. in my project I use this : CGContextSetRGBStrokeColor(current, R, G, B, A); so anytime I slide the slider I need to change the brightness of the color,

How do I rotate a video from UIImagePickerController before uploading to a webserver

浪尽此生 提交于 2019-12-06 05:13:45
I'm uploading videos to a web server after choosing the video using the UIImagePickerController. However, videos shot with the camera in landscapeRight orientation are inverted on the server. I want to use AVFoundation to rotate the video before uploading. I've figured out how to get the size and preferredRotation of the video using AVAsset. Now I need to apply an affine transform to the video before uploading. Here's an example of the size and transform from a landscapeRight video: 2011-01-07 20:07:30.024 MySecretApp[1442:307] size.width = 1280.000000 size.height = 720.000000 2011-01-07 20:07

GHUnit Linker Error with App Classes

核能气质少年 提交于 2019-12-06 04:42:35
问题 I'm trying to run a GHUnit test to just test that a setter actually works for a NSManagedObject object in my app. My app is called Machine and my GHUnit target is called Tests. I've added Machine as a dependency to the Tests target. My object in the test is called Goal. Here is the code and the error in the Link is shown below. #import <GHUnitIOS/GHUnit.h> #import <CoreData/CoreData.h> #import "Goal.h" #import "GoalRec.h" @interface ControllerTests : GHTestCase { } @property (retain) Goal

linker error Assertion failed: (atom->fixupCount() == 1)

本小妞迷上赌 提交于 2019-12-06 04:34:44
Using Xcode 4.0.2 , I have a target that compiles, links, and runs properly in the simulator. However when I compile and link it for an iOS device I get the following (full) linker error: Ld /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness normal armv7 cd /Users/mike/src/FOO/FOObar setenv IPHONEOS_DEPLOYMENT_TARGET 4.2 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin

Compiling FFTW3 for IOS 5.1 on OSX 10.7

扶醉桌前 提交于 2019-12-06 04:21:03
问题 A similar version of this question has been asked before (how to compile fftw3 on iOS) about previous versions of IOS and/or OSX, but I am unable to get fftw3 working on a actual IOS device. (Though it works fine in the simulator using the MacPorts "universal" distribution). If anyone has had any success using fftw3 please let me know how you were able to get it working! I am using OSX 10.7 and am trying specifically to run fftw on an iPad3 with IOS 5.1 installed. Thanks. 来源: https:/

xCode4 Lua Syntax Highlight [duplicate]

眉间皱痕 提交于 2019-12-06 04:13:01
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Adding syntax highlighting to programming languages in Xcode 4.0 Is it possible to make xCode4 to do syntax highlighting on .lua files? There are plenty solutions online for xCode 3.2, but I've found none for xCode4. 回答1: According to this site, the old XCode 3 syntax highlighting plugins were based on an unofficial and unsupported API. XCode 4 is a complete rewrite of XCode, so it's unlikely that API exists any

How do I bind an NSTextField's value to an NSObjectController's content without errors?

£可爱£侵袭症+ 提交于 2019-12-06 04:04:38
问题 I have a pretty simple set up here, and Xcode is giving me a comment-less red "!" mark in the interface builder. Started from a Core Data-based document template. The document xib has an NSObjectController instance, whose Managed Object Context is bound to the File's Owner (my NSPersistentDocument subclass). An NSTextField is present, whose Value I want to bind to the NSObjectController...and this is where the problem comes in. I type "title" for the "Model Key Path," because that's the

What does RELEASE_SAFELY mean and why does it not work in xcode4?

自作多情 提交于 2019-12-06 03:36:21
what does RELEASE_SAFELY or RELEASE_CF_SAFELY mean? Ok, it's for releasing objects but why not use [obj release] ? Besides I tried to use it in xcode 4 but I am running into buid errors: Undefined symbols for architecture i386: "_RELEASE_SAFELY", referenced from: -[AdressBookModel search:] in AdressBookModel.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Can I do just [obj release] instead? What would you consider? RELEASE_SAFELY is not a function but a macro and is usually defined like this: #define RELEASE_SAFELY(__POINTER) { [__POINTER release]; _

What is an exception breakpoint in Xcode

独自空忆成欢 提交于 2019-12-06 03:08:12
There have been posts about how to use exception breakpoint in Xcode. But my question is what exactly that is? It seems that I get a much complete stack trace when I enable exception breakpoint for all exceptions. Why is that so? Also I don't get error messages anymore. I am just really curious about how exception break points work. Thanks It's just a GUI wrapper around setting a symbolic breakpoint on objc_exception_throw . objc_exception_throw is just a C function that is used to raise all exceptions. So it's just like breaking on any function. You don't get log messages any more because the

Can I create an iOS unit test target for XCode (OCUnit) with CMake?

我只是一个虾纸丫 提交于 2019-12-06 02:54:41
I currently use CMake to create my iOS xcode project, for both my static libs and application target. Now would like to create the unit test target from CMake as well, but haven't found any resources on whether CMake supports this or how to create the octest target. Can I create this from CMake? If so, could you explain how? No, CMake doesn't support unit tests on iOS. Also you can not run separate executables on iOS. One of the solutions could be compiling your unit tests into a static library instead of executable and then link them to your XCTests or OCTests. You can do some magic with