Simple Question about CGRectIntersectsRect - iphone

I just have one simple question. Everytime I use
CGRectIntersectsRect(view1.frame, view2.frame)
I get a linker error stating the linker cannot find the files necessary to compile this method. I do have QuartzCore imported, I'm assuming theres another header I need. Sadly scouring the internet has left me nowhere, and I known this is definetely a simple issue that I keep overlooking. Any answers are appreciated!
Notice: I am using XCode 4 and iOS 5 beta

Import the CoreGraphics framework also. (Not 100% how to think about the distinction between this and QuartzCore, but they are different.)

You want CGRectIntersectsRect, not GCRectIntersectsRect. Make sure you also import the frameworks into your project.
EDIT: Did you add the QuartzCore framework to your project? If not, click on the blue project icon in the top left of Xcode under Run, click on the target, and under the Build Phases tab, select the Link Binary with Libraries option, click on the +, and then add the QuartzCore framework.
Hope that helps!

Related

Can't seem to import a framework into my current project in Xcode 10.2.1

Here's what I've done so far:
Create a Single View App project called MyApp
Create a Cocoa Touch Framework project called MyFramework
Created a Swift file with a class as public class FrameworkClass
Dragged MyFramework.xcodeproj into MyApp's Project Navigator - This caused Xcode to create a workspace.
I added the framework to MyApp.General.EmbeddedBinaries
Now it looks like this so far but I can't seem to import my framework still:
Please follow the steps to resolve your problem:
Choose your project, rather than a specific target, and open the
Build Settings tab.
In the Other Linker Flags section, add -ObjC.
If these settings are not visible, change the filter in the Build Settings bar from Basic to All.
Right before alt-tabbing Xcode to submit this response, I built on reflex and it turns out that it won't detect the references until you build once. After that, it should start to be detected by the text editor.
I was going to delete this question however, I already typed it up anyway so might as well. Hope this helps someone!

Use Automatic Referencing Count in specific classes in ios

Actually i came to this question when i was trying to add some classes that have been made upon ios prior to IOS 5 and these classes doesn't having ARC and the project i am trying to add is made upon the IOS 5 and it give me the compile time error related to ARC the classes having suck kind of information that if i try to remove the release/retain then it start behaving irregular.That is my problem, Now come to question i want to know that is there any way so that i can mark those classes not to use ARC so that the newly created classes that having base SDK ios5 compile with ARC and i mention not to use ARC simply compiled with their retain/release values.That is the only way i have left i think for making properly this app.
Any idea how i can use those classes that is having base sdk prior to ios5.
Thanks,
the image below will show you how to do it.
-fno-objc-arc flag to disbale arc
-fobjc-arc flag to enable arc
Go to your project settings, under Build Phases > Compile Sources
Select the files you want ARC disabled and add -fno-objc-arc compiler flags. You can set flags for multiple files in one shot by selecting the files then hit Enter key.
Go to Issue Navigator -> Validate project settings -> Perform changes. In this way Xcode automatically remove release and retain keywords from whole project and convert into ARC compatible.

Xcode 4 is no longer showing me where my warnings are?

Xcode 4 has stopped showing me the locations of build warnings that I have. How can i get it to start showing me them again?
Make sure you're looking in the right place. On the left-hand side of Xcode (4), look for the little error symbol. Click it and enjoy your errors in all their glory.
If you click on the errors and it doesn't take you to the location in code, I think something must be messed up with your Xcode install. I remember you had another question earlier about Xcode problems, so it wouldn't hurt to uninstall & reinstall.
In Xcode 4.3.1. I have one project that doesn't show any warnings, but others do.
So it's not an Xcode issue I guess.
In the Issue Navigator (⌘4) be sure to clear the filter at the bottom left of the screen:
Just click on the x at the right, at the filter will be removed -- worked for me!
Check the below SO post
(iphone) Is there a way to see compile output of xcode4?
press command + 4 for issue navigator. (there are two filter here "By File" and "By Type")

Adding CorePlot to iPhone Project - Errors?

Linker information below
Followed the directions.
Any ideas on how to fix?
Followed directions for install. I'm using Xcode 4.0.
Thanks, J
Did you follow the instructions? Make sure you add -ObjC -all_load -lCorePlot to Other Linker Flags.
Rechecked instructions and dragged CorePlot-CocoaTouch.xcodeproj into project properly. Solved the problem. Hope this helps someone else ;)
You need to include Foundation.framework in your "deleteTest" target. Select it then go to "Build Phases", you will see one of the phases as "Link Binaries and Libraries", expand this and click the + sign in the bottom left of this list. Add the Framework from this list.
There I found a good link for using Core-Plot having detailed explaining how to add it to project & use the delegate method of Core-Plot.
http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application
It worked g8 for me. Hope you would be able to do the same ,yesterday only I did the same thing from here.

Xcode iPhone - Adding framework works a little bit

No biggie, but when I add the AVFoundation framework for the iPhone, it turns red for some reason I'm unable to figure out why. The project will not compile unless I add this framework, and if I do, Xcode will mark the framework red (apparently that means xcode cannot find the framework), but yet it will work.
This is quite annoying. Any clue what I might be doing wrong here?
Try adding AVFoundation framework via your target.
Look for your target under "Groups and Files"
"Get Info" for it
Click the "General" tab
At the bottom right of the window click the "+" button
At the top of your list you should find AVFoundation, add it.
close Xcode
delete your project
shut down your mac
take the mac back to your boss and tell him it's not working
wait until they figure out what it is
if this doesn't work, find a new job that doesn't require the use of a mac
All I had to do was open up the "General" settings tab for the project and change the "Base SDK for All Configurations" value. It was set to an SDK that I no longer had installed.