0

Which file do I need to import into my project? If I just import the "Masonry" folder, it doesn't seem to work. Do I need to import other libs?

Maximillian Laumeister
  • 19,884
  • 8
  • 59
  • 78
kRadius
  • 11
  • 2

3 Answers3

2
git clone https://github.com/desandro/masonry.git

Open your project in xcode, right click and add files to your project.

Use it with #import "Masonry.h".

Maximillian Laumeister
  • 19,884
  • 8
  • 59
  • 78
user1927627
  • 254
  • 4
  • 6
1

Use CocoaPods. CocoaPods is the dependency manager for Objective-C projects. It has thousands of libraries and can help you scale your projects elegantly. You can import any static library using simple Podfile and command line.

Anuj Rajput
  • 836
  • 9
  • 30
0

Maybe use CoacoaPods is a good idea.If you use MAC OS X,It's very convenient to install by terminal

1.Install Ruby

2.input sudo gem install cocoapods in terminal

3.create a new project and enter the cd /your project path(where you .xcodeproj in it)

4.enter vim Podfile

5.use vim to write down pod 'Masonry'

6.press esc and input :wq

7.enter pod install

8.open the *.xcworkspace and import Masonry.h

all in all,CocoaPos is a good tool to import framework.

Creator
  • 166
  • 1
  • 2
  • 8