How to include AQGridView in one project?

The documentation states that "this project is compiled into a static library that you can include, or you can directly reference the source files."

Here is what I did. I downloaded it from GitHub and unzipped it. Here are the classes that I see.

enter image description here

Now which of these files is the “static library” that I have to import into my project?

Also, if I just want to reference the source files, should I just copy the .h / .m files in Classes into my project? I tried to do this, but when I try to create it, I get the following error:

Undefined symbols for architecture i386: "_OBJC_CLASS_$_CALayer", referenced from: objc-class-ref in AQGridViewCell.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status 

Can someone show me how to do this?

+4
source share
4 answers

All you have to do is add class files to your project. Use AQGridView.xcodeproj as a link to see how it uses classes. It’s actually very convenient to use a class library.

Once you have added class files to your project, when creating a new view manager, simply configure. Make sure you use delegates for this, and if you want to change the gridViewCells, just extend the AQGridViewCell class.

Also, as @FoJjen mentions, make sure you add QuartzCore.framework to your project

+9
source

You can try to add the QuartzCore environment to your target.

+17
source

Add classes first. Then add the QuartzCore library from Build Phases-> LinkBinary with the libraries. It's all.

+3
source

1-2 hours worked, so I wanted to share it with others

I see two possible ways to achieve this (tested on Xcode 4.5)

The first way is the correct link

  • Make sure that another instance of Xcode is not open. Drag the Xcode project file (from Finder) into your project (into the Xcode Explorer window).
  • Click on the project in the Explorer window, go to the "Phase Assembling" section in the "Linking Binary Files to Libraries" section, add "libAQGridView.a" and QuartzCore.framework
  • You must be tuned. Just remember to include the necessary header files when using it.

The second way - Copying classes

You can see the samples. It simply copies the source code to the project (rather than linking it as a static library)

+1
source

All Articles