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

208 questions
2
votes
0 answers

UITableView lags on build

I need help with debugging one performance issue. Overview I have two ViewController A and B. A pushes B on UIButton click. B contains UITableView. Problem When I click on UIButton in A UI freezes for 1-2 sec and then B will appear. When I remove…
Kamil Harasimowicz
  • 3,534
  • 5
  • 26
  • 48
2
votes
1 answer

Snapchat SnapKit Login on iOS 'fetchUserDataWithQuery' always fails with SCOAuth2ClientErrorDomain 403

I'm trying out Snpachat's SnapKit login api, and I've setup my project as described in the documentation/guide. I've allowed the use of all the scopes, i.e. external id, display name and bitmoji in the dashboard and added the required fields in the…
2
votes
1 answer

Snapkit and multiple custom cells in TableView

I am using UItableView as a base for a user profile page. I have several custom cells. The first custom cell is images wrapped in scrollview. I have this error when I open this…
Kira
  • 1,455
  • 4
  • 22
  • 42
2
votes
1 answer

Adding Snapkit to xcode manually

How to add Snapkit in xcode manually without using cocoapods or carthage ?
Koustov Basu
  • 72
  • 11
2
votes
1 answer

Equal Spacing for several views using SnapKit

How can I use snap kit to achieve the same spacing between views (and the superview for firstSubview.left and lastSubview.right) like for the bars in the picture below (and using SnapKit instead of stack view or so)? Thanks!
Pascal
  • 2,310
  • 2
  • 14
  • 40
2
votes
1 answer

Swift Nested Stack Views

Came form android background now trying to understand UIStackView in ios with simple login view example but got confused from distorted output. Following are my details: My Login view file: import UIKit import SnapKit class LoginView: UIView { …
Pushpendra
  • 2,603
  • 4
  • 20
  • 45
2
votes
1 answer

Modify constraint programatically using SnapKit in Swift 3 to remove one UIView

I'm modifying the constraint of UIView height consist of nameTextField and its superView inputContainerView using SnapKit. I arrange the height of nameTextField is equal to one-third of the inputContainerView's height. My purpose is to remove the…
rony
  • 382
  • 3
  • 16
2
votes
0 answers

dyld: Library not loaded: @rpath/libswiftMetal.dylib on iOS 11(15A5304j) with Xcode 9 beta 6

I'm trying to provide iOS 11 support to my existing project but when I launch my existing project, my app gets crash as soon as it launches with following error at Xcode console dyld: Library not loaded: @rpath/libswiftMetal.dylib Referenced from:…
Suryakant Sharma
  • 3,356
  • 1
  • 20
  • 43
2
votes
1 answer

View not displayed immediately after layoutIfNeeded is called

I'm trying to have a simple slide-down-from-top animation using auto layout (with the help of SnapKit). Below is the code I use to generate a view, set its constraints and force a reload (thus display) of said view. In the same code cope I change…
2
votes
1 answer

Can two views be spaced using each other in SnapKit?

I want to space an unknown amount of buttons equally across the screen horizontally. I was wondering if I could create their spacing based off each other. For example will the code below work? let button1 = UIButton() let button2 =…
SmedleyDSlap
  • 656
  • 1
  • 10
  • 24
2
votes
1 answer

Swift SnapKit how to layout UIView with relative position

func setupPosition() { box.snp.makeConstraints{(make)->Void in make.edges.equalTo(view).inset(UIEdgeInsetsMake(64+20, 20, 250, 20)) } textField.snp.makeConstraints{(make)->Void in …
littlebear333
  • 634
  • 2
  • 6
  • 14
2
votes
1 answer

Cannot set backgroundColor of UIView which is a subview of UIScrollView in Swift

I try to add some UIView objects as subviews to a UIScrollView and give them random color. But these UIView objects' backgroundColor are white. Why can't I set their backgroundColor? I run this project on iOS 10.1, Swift 3.0.1 and SnapKit 3.0.2.…
songlebao
  • 73
  • 1
  • 6
2
votes
0 answers

SnapKit 3.0.0 Swift3 error

I get error. when install "SnapKit 3.0.0" Argument labels '(offset:)' do not match any available overloads Argument labels '(inset:)' do not match any available overloads Argument labels '(priority:)' do not match any available overloads
Inna Black
  • 251
  • 3
  • 9
2
votes
1 answer

Terminating app due to uncaught exception Cannot Install Constraint, reason: No common superview between views

I am trying to programmatically create a button and apply constraints with SnapKit. Everything works fine, but when i apply constraint as make.center.equalTo(self.view) it crashes giving me this message "Terminating app due to uncaught exception…
1
vote
1 answer

Create ScrollView programmatically using Snapkit

I'm working on making scrollview programmatically using snapkit, it works scroll but the problem is that the last element(systemTeal color tempView) can't see fully. I create contentView inside Scrollview, which is containing every element. class…
1 2
3
13 14