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
2 answers

How to instantiate a UITableViewCell from a nib

One can add a tableviewcell in the nib of its tableviewcontroller, but how do you get to it?
CiNN
  • 9,752
  • 6
  • 44
  • 57
5
votes
1 answer

Best way to handle multiple UITableViews in one UIViewController?

I have a UIViewController that should be capable of displaying tableViews with multiple data sources. The UITableView spans about half the size of the screen, and there is and up and down button that allows you to go through different data.…
randombits
  • 47,058
  • 76
  • 251
  • 433
5
votes
4 answers

Core data / NSFetchedResultsController error

I'm having some trouble with core data / NSFetchedResultsController. I'm not entirely sure where the error is as the message is quite vague. I have an issue with inserting more than one object when the fetched results controller has no objects…
Daniel Wood
  • 4,487
  • 3
  • 38
  • 36
5
votes
2 answers

Find UIGestureRecognizer action (selector) name and target

I'm trying to find which action is triggered by a UIGestureRecognizer on which target. Unfortunately there is no property on a UIGestureRecognizer such as gesture.action or gesture.target. The gesture I'm analyzing is part of UIKit private…
Nicolas Manzini
  • 8,379
  • 6
  • 63
  • 81
5
votes
6 answers

White line under UINavigationBar in IOS 7

I have a UITableViewController with a UISearchDisplayController and UISearchBar. I'm seeing a white line under the navbar when I present the view in a UITabBarController. When I present the view modally in a UINavigationController, the line is…
user594161
5
votes
0 answers

UINavigationBar subclass pushing and popping methods not called

I'm subclassing UINavigationBar because I need iOS 7 appearance all the way to iOS 5. I've overridden the following methods: - (void)pushNavigationItem:(UINavigationItem *)item animated:(BOOL)animated { NSLog(@"pushNavigationItem:animated:"); …
HiveHicks
  • 2,294
  • 5
  • 28
  • 42
5
votes
1 answer

UIPercentDrivenInteractiveTransition cancelTransition turns screen black

I'm implementing custom navigation transitions, and using UIPercentDrivenInteractiveTransition to do the trick. I've got the noninteractive transition working fine, and I'm using an animation block to handle the transition animation, but once I…
bryanjclark
  • 6,247
  • 2
  • 35
  • 68
5
votes
2 answers

iOS7 UIPickerView doesn't properly display custom views with images

This issue started happening in iOS7 with the new UIPickerView controller. To use images in your UIPickerView controller you must use the delegate method to return an image: pickerView:viewForRow:forComponent:reusingView: The problem is that the…
Ed Trujillo
  • 1,371
  • 11
  • 9
5
votes
1 answer

iOS 7: UIWebView crashes because of range exception

I'm currently building an App that uses the krpano viewer, which is a Panorama Viewer built with JavaScript. I'm loading this Panorama viewer in a UIWebView with local images that are saved on the iPad. But after using the Panorama viewer for a…
chritaso
  • 613
  • 7
  • 23
5
votes
3 answers

UIBarButtonItem not flat on iOS 7

just a quick question. I'm updating my company's app for iOS 7 and I'm running into a couple of walls. Right now, the big one is the UIBarButtonItem. When I compile my app against iOS 7 then run the app, I get the old bar buttons. In short, my bar…
5
votes
2 answers

iOS7 Implement UIViewControllerTransitioningDelegate with Storyboard

Since iOS7 we can create custom transition from view controller to view controller using UIViewControllerTransitioningDelegate which allows fine grained transitions. viewController.transitioningDelegate = transitioningDelegate; I discovered that…
Nicolas Manzini
  • 8,379
  • 6
  • 63
  • 81
5
votes
1 answer

Set UIKeyboardAppearance across the whole app

Is there a useful property in a cocoa-touch project that would allow setting the one-and-only consistent style of keyboard appearance throughout the app? Say I want UIKeyboardAppearanceAlert on all the textFields and textViews I have in my app…
Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120
5
votes
4 answers

Detecting tapped character. UITextView characterRangeAtPoint always returns nil

I'm trying to determine, which particular character in UITextView has been tapped. I tried to use characterRangeAtPoint: method. But it always returns nil, wherever in the UITextView I tap. I even wrote and run the following piece of code: for (int…
illyge
  • 183
  • 1
  • 8
5
votes
5 answers

Setting multiple borders on UIView

As I cannot find any questions/answers for this, I imagine it is not possible. Is there anyway to set multiple borders on a UIView. I am currently setting a standard border with .layer.borderWidth and layer.borderColor. I am wondering if I can add…
StuartM
  • 6,743
  • 18
  • 84
  • 160
5
votes
2 answers

UIKit additive blending

This has been asked before but I didn't find a satisfying answer yet. Is there really no way to set a blendmode for a UIView (that is, use GPU compositing to achieve the blending). There are some suggestions using CGContextSetBlendMode like here:…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76