Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
338 views

Table View Controller class in Swift

My TableView consists of four cells (for blacklisting categories) with a boolean property (indicated with a checkmark) and another cell with a UISwitch embedded in ...
Richard Robinson's user avatar
6 votes
0 answers
8k views

Page and center UICollectionView like App Store

I need a collection view to page through cells and center it like the App Store, where a portion of the previous and next cells look like this: The native ...
TruMan1's user avatar
  • 143
2 votes
0 answers
201 views

Comments on singleton Swift status bar alert

I was trying out some projects like a status bar alert. It made most sense for this status bar to be a singleton: there is only one alert visible at a time. ...
Daniel's user avatar
  • 265
2 votes
1 answer
17k views

Setting constraints for dynamic views in iOS

I have an app which uses Stack Views to update its UI depending on the number of pigs. For example below, 1 pig and 4 pigs. I set up Stack Views in Storyboard and set isHidden to true based on how ...
Mochi's user avatar
  • 143
2 votes
0 answers
52 views

Comments on a 'PullableView'

I created a view called PullView which adds a level of interactivity to UI components. PullViews can be pulled sort of like a ...
IHaveAQuestion's user avatar
3 votes
0 answers
173 views

Adding swipe support to multiple classes

I have implemented swipe functionality using UIPanGestureRecognizer in a project. What I have done is added PanGesture to ...
LC 웃's user avatar
  • 143
3 votes
1 answer
3k views

Set a font for a UITextView if the font is nil or not equal to desired font

Main question I am setting a font for a UITextView that is a subview in a custom view. I only set it if the user didn't specify the font size in the Interface Builder. I have the following working ...
Suragch's user avatar
  • 405
4 votes
2 answers
7k views

Removing a subview with a subview from a UIView without memory leaks

I made a custom UITextView for vertical Mongolian writing. It is made by subclassing UIView, which has a subview called ...
Suragch's user avatar
  • 405
5 votes
0 answers
2k views

Reducing complexity in NSView event handling code in Swift

My Cocoa event code always tends to descend into madness, I need to advice on how to reduce complexity. I've spend a few hours putting this example together. CanvasView is a layer hosting subclass of ...
boyfarrell's user avatar
15 votes
1 answer
7k views

IBDesignable UICheckbox

A more up-to-date version of this control can be found on GitHub. One UI control that has always been mysteriously missing from Xcode's interface builder is some sort of checkbox. ...
nhgrif's user avatar
  • 25.4k