Questions tagged [snapkit]

A Swift Autolayout DSL for iOS & macOS. Use if you have questions about the library and not about Snapchat or similar services.

SnapKit is a DSL to make Auto Layout easy on both iOS and macOS.

GitHub Page

239 questions
0
votes
1 answer

"superview" not recognized

I am looking at the SnapKit documentation: http://snapkit.io/docs/ If you go to the usage section it has the following example code: let box = UIView() superview.addSubview(box) box.snp_makeConstraints { (make) -> Void in …
Foobar
  • 7,458
  • 16
  • 81
  • 161
0
votes
1 answer

iOS SnapKit performance on presented view

Issue Description I'm creating a new view and have the constrains of all the UI elements on a function that is called on the viewDidLoad function. The view is presented via the following code, the time it takes to show the view the fist time is…
MDompekidis
  • 335
  • 4
  • 13
0
votes
1 answer

SnapKit autolayout broken: "Unable to simultaneously satisfy constraints"

Two view in UICollectionView Cell. UIImageView and UIView . Like this:layout But when I make constraints, I get an error: Unable to simultaneously satisfy constraints imgView.snp_makeConstraints { make in …
0
votes
1 answer

swift: SnapKit in swift doesn't work

When I change main navigation controller(view controller.swif) to profileviewcontroller.swift my override func viewDidLoad() { super.viewDidLoad() createTop() } my createTop() in profileviewcontroller.swift function can't add something to…
0
votes
1 answer

What's a good approach to build stacked views with SnapKit

What I'd like to do is is build constraints for a view that is stacked like this if it was built with the Visual Format Language. "H:|-[title]-[toggle]-|" What would be the best way to do this using SnapKit? I'm doing this for now, but it is kind…
kross
  • 403
  • 4
  • 7
0
votes
1 answer

Accepting a callback to a function as param

I am using SnapKit and I am trying to pass the closure as a param to my function which calls snp_makeConstaints like below, func drawView(view: UIView, callback: (() -> Void)!) { self.addSubview(view) view.snp_makeConstraints(closure:…
Nagendra Rao
  • 7,016
  • 5
  • 54
  • 92
-1
votes
3 answers

why Xcode do not execute the codes in func tableView?

question: I set several breakpoints inside the function of tableView. However the Xcode didn't execute the code inside the tableView. please tell me how to fix these. I'm new to learn about IOS development and I'm trying to write a demo of Tweeter…
malcopolocei
  • 123
  • 1
  • 9
-1
votes
1 answer

Android Creative SnapKit: Photo with attachment Url pop-up opens twice

I am trying to share Image on SnapChat with attached URL generated from Branch IO. For that I have used Creative SnapKit. When I clicked on the attached link, it gives me two pop-ups. First pop-up redirects me to Playstore The second pop-up…
Aanal Shah
  • 1,946
  • 2
  • 20
  • 30
-1
votes
1 answer

Find the lowest positioned element

I'm trying to make constraints via Snapkit in a table view cell but my problem is I need to find out which element has max y position (The lowest one). I have an UIImageView and next to image view UILabel elements. The label text is dynamic and…
mihatel
  • 846
  • 14
  • 34
-1
votes
1 answer

Autolayout Can I combine CenterY with Top and Bottom Constraints?

I'm trying to make this layout somehow dynamic. The options here are dynamic (unknown count), so we can easily put these options in a tableView, collectionView, or just simply scrollView. The problem is that I wanna make this white container small…
Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95
-1
votes
2 answers

ContentView for tableViewCell not auto-resizing correctly?

I have added 2 labels to my cell and setup these constraints with snapkit, issue is I cant get the cell to expand correctly, it stays at its default height: titleLabel.snp.makeConstraints { (make) -> Void in …
JJPark
  • 11
  • 2
-2
votes
1 answer

How to maintain other label's position?

I'm building an app that can add UILabel(can move with gesture) on UIView. First, Add a label and move it to another position. Second, Add another label. Then makeConstraints have an effect on first label. I wanna maintain first label's position How…
-2
votes
1 answer

Snapkit: How can I embed a simple tableView inside a scrollView?

I'm using Snapkit in my iOS project. View -> ScrollView -> Tableview I tried view.addSubview(scrollView) scrollView.addSubview(tableView) I tried setting a bunch of constraints on the tableview but it never shows up on the scrollview. Whereas if I…
Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64
-4
votes
0 answers

Why does the web code for the Snapchat Bitmoji Kit lead to a "Something Went Wrong Error"?

I am trying to implement the Snapchat Bitmoji Kit into a webpage using the Javascript implementation. Here is the code I am following: https://github.com/Bitmoji/BitmojiForDevelopers/blob/main/docs/vanilla-sticker-picker/index.html I am able to get…
1 2 3
15
16