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

How to dismiss view controllers at any time (even during transitions) or when it is safe to dismiss a view controller ?

I have an iOS app that has a connection to a server. If we get disconnected, I want to be able to dismiss the top view controllers to get back to a "connecting to server" view controller. The problem is that a disconnection can occur at any time,…
Nick Sonneveld
  • 3,356
  • 6
  • 39
  • 48
5
votes
1 answer

iOS - UITableView Index: Is there a way to highlight the selected alphabet?

I've a table view for which I've provided/turned on the Alphabetical Index on the right side. This does help in jumping through the content. Now I was wondering whether there is a way to highlight the letter/alphabet (or make letter bold) which is…
Code.Decode
  • 3,736
  • 4
  • 25
  • 32
5
votes
2 answers

UIPageControl dot for a search page

Is there any way to add a magnification glass icon instead of the dot for my first page, that allows to perform some search, using the UIPageControl for my native application on the iPhone? I've tried to google, but haven't find similar questions at…
Denis
  • 6,313
  • 1
  • 28
  • 27
5
votes
4 answers

Converting a UIImage into a data URI

Suppose I have a UIImage instance that I would like to convert into a data URI and inject into a UIWebView. I know I can convert the UIImage to PNG/JPEG NSData using PNGRepresentation/JPEGRepresentation methods. But then how do I make sure that the…
Andrew Lauer Barinov
  • 5,694
  • 10
  • 59
  • 83
5
votes
2 answers

UIDocumentInteractionController disable open in certain apps

I'm currently using a UIDocumentInteractionController for open in functionality. When it opens it shows a list of all apps on the device that can handle that file type. Is there a way to disable my app sending a document to specific apps, even if…
yodatg
  • 91
  • 1
  • 2
  • 6
5
votes
2 answers

What does UIViewController class do in viewDidLoad?

As in the title, I was wondering what is the "default" implementation of viewDidLoad in UIViewController? Does it really do anything? Also does it matter if in my UIViewController's subclass I write -(void)viewDidLoad{ [super viewDidLoad]; …
johnyu
  • 2,152
  • 1
  • 15
  • 33
5
votes
5 answers

UIButton flashing animation

I was wondering if it was possible to apply a flashing animation to a UIButton. I have searched but only found the code for a pulse animation which changes the size of my UIButton continuously. I instead was thinking about some kind of flashing…
Alessandro
  • 4,000
  • 12
  • 63
  • 131
5
votes
4 answers

How to change UIScrollView contentOffset animation speed?

Is there a way to change contentOffset animation speed without creating your own animation that sets the contentOffset? The reason why I can't create my own animation for contentOffset change is that this will not call -scrollViewDidScroll: in…
openfrog
  • 40,201
  • 65
  • 225
  • 373
5
votes
1 answer

How to consistently draw NSAttributedString in UITextView in UITableViewCell

I am having trouble getting consistent results from UITextViews in a UITableViewCell using NSAttributedStrings. Inside - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath: UITableViewCell *cell =…
Piotr Tomasik
  • 9,074
  • 4
  • 44
  • 57
5
votes
8 answers

If a method is called at the exact same time twice, how to only execute it once?

We have a method in the iPhone SDK that is a delegate method. Problem is, the OS calls this method twice at the exact same time. This method does some heavy lifting so I don't want to execute the logic twice. What is a good way to detect this and…
erotsppa
  • 14,248
  • 33
  • 123
  • 181
5
votes
5 answers

UIScrollView inside a UITableViewCell - No didSelect call

I have a tableviewCell, where the user can scroll horizontally. Since the scrollView covers nearly the whole cell, the tableView method didSelectRow gets not called if the user clicks the cell. So I thought, I could pass the touch event of the…
Grinarn
  • 127
  • 1
  • 8
5
votes
3 answers

Customizing tint color of UIBarButtonSystemItem with UIAppearance API

I know I can customize the UIBarButtonItem text via setTitleTextAttributes:forState: There is also a way to customize UITabBar icons via setSelectedImageTintColor: Is there a way to customize the tint color of a UIBarButtonSystemItem, (e.g. the…
ilmiacs
  • 2,566
  • 15
  • 20
5
votes
3 answers

Why is MFMailComposeViewController crashing?

I'm seeing a weird crash after calling "[MFMailComposeViewController canSendMail]". I cannot reproduce it, it's from iTunesConnect. That method (canSendMail) is being called from the main thread, and at that point, i'm not doing anything with the…
5
votes
1 answer

iOS: writing a CGImageRef disk in png or jpeg

What is the best way to save CGImageRef to a png or jpeg file in iOS? For a general cocoa application (not using UIkit), see: Saving CGImageRef to a png file? but this seems too long and clunky.
Guy
  • 12,250
  • 6
  • 53
  • 70
5
votes
3 answers

How can I animate a UIButton Alpha property with MonoTouch

I have a simple UIButton with an Alpha property that I would like to animate from 1.0f to 0.0f, and then back to 1.0f. This is basically responding to TouchDown. Also, is there anything special I need to do if the routine I am calling from is not on…
bengrine
  • 246
  • 3
  • 12
1 2 3
99
100