Questions tagged [uikit]

UIKit (not to be confused with the front-end framework GetUIKit) is the object-oriented framework that is responsible for most of the iOS user interface.

UIKit (not to be confused with the front-end framework ) is the object-oriented framework that is responsible for most of the user interface. UIKit is part of the umbrella framework, and it is to Cocoa Touch as AppKit is to the Cocoa framework on macOS. The classes in UIKit determine the basic structure of most iOS applications as well as the majority of distinctive user interface elements that make iOS apps easily recognizable and instantly familiar.

UIKit provides the classes and protocols that lie at the foundation of any iOS application, including:

  • UIApplication
  • UIResponder
  • UIView
  • UIWindow
  • UIControl
  • UIEvent
  • UIViewController
  • UINavigationController
  • UITabBarController
  • UISplitViewController

It also provides the user interface elements with which all iOS users are familiar:

  • UIButton
  • UITextField
  • UITextView
  • UINavigationBar
  • UIToolbar
  • UITabBar
  • UISwitch
  • UILabel
  • UIScrollView
  • UITableView
  • UITableViewCell
  • UIPickerView

These lists are not exhaustive, but only meant to give a sense of the scope of the UIKit framework. A more complete list is found in the UIKit Framework Reference.

11807 questions
5
votes
1 answer

UILabel size incorrect for single line of text with lineSpacing and multiple colors

I'm pretty sure this is actually a UIKit bug but want to get some input to see if I'm missing something silly here. Here is the code I have: // single line with modified line spacing and 2 colors - broken, line spacing is added to the…
Dima
  • 23,484
  • 6
  • 56
  • 83
5
votes
0 answers

Cancelling UIActivityViewController while sharing in iOS7.1

I am using a UIActivityViewController to share a video file. The video file is generated before it's being shared using an UIActivityItemProvider. Because the file generation and sharing can take a while for longer videos, it's important that the…
adriaan
  • 1,574
  • 14
  • 33
5
votes
2 answers

Difference between dequeueReusableCellWithReuseIdentifier: and cellForItemAtIndexPath:

I have been wondering why my code works well with cellForItemAtIndexPath: & not with dequeueReusableCellWithReuseIdentifier: while fetching collection view cells. Here is my code: This one works Fine: NSInteger numberOfCells = [self.collectionView…
5
votes
0 answers

How to force trailing spaces in a right-aligned UITextView?

I have a UITextView that can be either left-aligned, right-aligned or centered. I noticed that if I right-align the textView, any trailing spaces in any of the lines of text in the textView are ignored. This doesn't happen for leading spaces when…
adriaan
  • 1,574
  • 14
  • 33
5
votes
1 answer

Navigation controller isn't hiding tabbar when hidesBottomBarWhenPushed = YES on state restoration

I have a problem restoring state for view controller with hidesBottomBarWhenPushed=YES pushed in UINavigationController that placed within UITabBarController. What happens is basically the UINavigationController stack is restored and the right…
pronebird
  • 12,068
  • 5
  • 54
  • 82
5
votes
1 answer

UISlider with uneven steps.

I need to implement a slider control like the below image Slider will have uneven length steps. Whenever user slides the slider slider will only stop at one of the step which is near to the current range. But the real challenge is UISlider with dots…
Dinesh Kaushik
  • 2,917
  • 2
  • 23
  • 36
5
votes
1 answer

Binding a UISwitch's state to a model with ReactiveCocoa

I am trying to bind a UISwitch's on state to a boolean property in my model using ReactiveCocoa. I started with: RACChannelTo(self.switch, on, @NO) = RACChannelTo(self.model, toggle, @NO); This is how I've been binding other views to other parts of…
Andy Molloy
  • 111
  • 2
  • 7
5
votes
1 answer

Customizing UIPageViewController gesture recognizers Scroll behavior

I want to implement -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch gesture delegate in pageviewcontroller.m file but i can't get any gesture as: NSArray *temp =…
Irfan Gul
  • 1,579
  • 13
  • 23
5
votes
1 answer

Programmatically change the UIImageView displaying image1 to image2

The UIImageView is placed in interface builder. I already created an IBOutlet. How do i programmatically change the UIImageView to view another image. Can someone please help me?
Pavan
  • 17,840
  • 8
  • 59
  • 100
5
votes
3 answers

iPhone UIScrollView / setContentOffset weirdness

I have a weird issue with setContentOffset which I don't seem to be able to solve: I'm trying to build an "endless" scroll view, so I'd like to reset the content offset at a certain position. With the code below setContentOffset will be called at…
bibac
  • 449
  • 8
  • 17
5
votes
2 answers

the old display shifts-down-after-modal-view-controller issue

I've checked the other answers but have not found anything that really describes my situation. So here goes. I have a window-based app that creates and loads a UIViewController from xib. It has status bar disabled, height of 480 and a…
Adam Eberbach
  • 12,309
  • 6
  • 62
  • 114
5
votes
1 answer

UITextView does not respect the secureTextEntry property

I'm trying to get a UITextView (NOT a UITextField) to act as a password field where the text is obfuscated as you type into it. However, setting this property to YES on a UITextView seems to have no effect and the letters are always visible instead…
Kevlar
  • 8,804
  • 9
  • 55
  • 81
5
votes
2 answers

ABPeoplePickerNavigationController alternative that allows selection of multiple people

I'd like to prompt the user to select 1 or more people from their address book, but ABPeoplePickerNavigationController doesn't allow that (which is ironic, since it's people picker, not a person picker). Before I go create my own, does anyone know…
Jaka Jančar
  • 11,386
  • 9
  • 53
  • 74
5
votes
5 answers

Very Intermittent Orientation on Device & Simulator

I've noticed that I'm getting very intermittent orientation on my device & the simulator. I have a modal view controller that I present, and that is the only thing in my app which supports rotation. If I launch the app in portrait without moving…
Michael Waterfall
  • 20,497
  • 27
  • 111
  • 168
5
votes
7 answers

How do I change the colour of the status bar when the navigation bar is hidden in iOS 7?

I am aware of how to change the colour of a navigation bar (and status bar) by doing this: self.navigationController.navigationBar.barTintColor = [UIColor redColor]; But when I hide my navigation bar, the status bar color reverts back to…
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156