Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [uikit]

UIKit is the infrastructure framework on which all iOS user interface is built

1
vote
0answers
33 views

UICollectionViewCell's content layout misbehaves when UICollectionView scrolls to the top of the screen

UICollectionViewCell's content misbehaves , the layout animates, when UICollectionView scrolls to the top of the screen. I am asking here, because it looks like an apple's bug. looks like squeezed ...
4
votes
1answer
129 views

“What To Do” App

I am starting to build up my portfolio, so I am starting to build projects whenever an idea pops up in my head. So, I decided to build an app that helps you decide what to do. Basically how it works ...
0
votes
1answer
58 views

Change level button's image

There are 12 buttons, and each of them has 3 options for selecting pictures, depending on the data. It works but I think need a shorter and more intelligent decision. ...
4
votes
1answer
179 views

A helper class for creating icons from a PNG image and colour in Swift

I have made a helper struct in Swift that creates circular icons from a PNG image (a white icon on transparent background) and a background ...
3
votes
1answer
234 views

Adding dragging ability to a UIView using protocols

I recently published an iOS control/component called BJDraggable which basically, with a call of a method, enables us to drag a view within its superview boundary. ...
1
vote
1answer
1k views

Draw grid programatically with borders

I need to draw a grid with some special requirements. My current solution is working but is far away from ideal I guess. Attached you can find the current working solution: Some of my thoughts which ...
1
vote
1answer
840 views

UIViewController without interfacebuilder

I have a template I've been using with Swift for UIViewController and UIView subclasses without a ...
1
vote
0answers
53 views

Block breaking with paddle/ball iOS Game

I created an iOS app that recreates the "ball breaking" game where a paddle is used to deflect the ball to break blocks. The main purpose is to get familiar with UI concepts since I have primarily ...
1
vote
1answer
6k views

Proper cellForRowAtIndexPath cell return in Swift

So I have started creating a UITableView with multiple prototype cells. I currently have the below code setup, which works fine ...
3
votes
1answer
1k views

Extending UITableViewCell to preserve UIView background color when selecting the cell

When a UITableViewCell has subviews with background color set, when setSelected(_: animated:) gets called, all the views are ...
1
vote
1answer
121 views

Factory pattern for image or shape marker [closed]

I'm making a photo marker application and need to make a factory pattern for marker. I think it is not very flexible and overall not good. Would you check my code and suggest what could be improved? ...
3
votes
1answer
2k 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 ...
4
votes
2answers
6k 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 ...
10
votes
1answer
1k views

Blurring an Image

Lately, I've been part of a team working on a utility library for iOS called Thundercats (on Github). We're about to start working on some changes and upgrades in preparation for a 2.0 release, so we ...
8
votes
2answers
1k views

iOS Utility methods for UIView

Lately, I've been part of a team working on a utility library for iOS called Thundercats (on Github). We're about to start working on some changes and upgrades in preparation for a 2.0 release, so we ...
3
votes
1answer
3k views

Draw an arc based on a given percentage

I wanted to create a class that would allow me to draw an arc representing a percentage of progress, similar to the activity view on the Apple watch. There are various examples which I found helpful ...
5
votes
1answer
296 views

Sierpinski Triangle

I am a Java programmer who recently started learning some Swift. I made an app that displays the Sierpinski triangle and adds triangles if the user pans up, and zooms in and out using the pinch ...
10
votes
1answer
552 views

Finger painting code

I have a very simple view that handles touch events and draws accordingly. It's nothing significant, but it does use a bit more CPU than I would like (35%). Again, it is the bare minimum (<90 lines)...
15
votes
1answer
6k 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. ...