uisegmentedcontrol

Stop UIWebView from loading the set URL everytime when it gets loaded

Deadly 提交于 2019-12-11 23:19:02
问题 I have an app with several UIWebView's and when I press the button to bring one up it loads the set URL. Now I would like this to happen the first time, as the webpage needs to load, but what if I want to flick between the different Views? I would like it to stay at the page it was when I left it. Now I do believe this can be done with the UITabBarController, but it takes up to much screen real estate for what I want to achieve, so I have implemented the switch with a UISegmentedController. I

Linking two UISegmentedControls

安稳与你 提交于 2019-12-11 16:55:22
问题 I'm currently trying to connect two UISegmentedControls where the first Viewcontroller is connected to the second. Tapping the second UISegment will update the value of the first one. ViewController: class ViewController: UIViewController { @IBOutlet weak var tipLabel: UILabel! @IBOutlet weak var totalLabel: UILabel! @IBOutlet weak var billField: UITextField! @IBOutlet weak var tipController: UISegmentedControl! @IBOutlet weak var splitController: UISegmentedControl! @IBOutlet weak var

Multiline Text On UIsegment Control

余生颓废 提交于 2019-12-11 16:48:17
问题 I have a UISegmentControl with default style (White). I want to add text on it. But the text that i want to put on it is a long text. I have to show the text in 2 lines of a segment. But i dont have to raise the width of the segment Because of screen width limit & no of segments. I had tried to put a label on segment control programmatically, but my label is not displayed. Although we can put a label on segment control using XIB. but due to dynamic nature of text & segment control, I have to

How can i add a next and previous button at the segmented Controller?

岁酱吖の 提交于 2019-12-11 15:25:37
问题 In my application I have a segmented controller at navigation bar and until now I have 6 buttons there. But now I want to add more 5 buttons with these 6 buttons at segmented controller but problem is I want to add an previous and next button at segmented controller to see previous buttons and next buttons of the segmented controller. NOTE THAT: I know how can set an segmented controller at navigation bar. Until now, I have become able to set segmented controller at navigation bar. If I

iOS - Is this UIPageViewController controlled by UISegmentedControl, or what is this?

試著忘記壹切 提交于 2019-12-11 05:17:05
问题 How this UIPageViewController can be controlled by this header which seems to be UISegmentedControl ? 回答1: The top bar looks like a custom control with an interesting indicator line. This could be accomplished by putting the 2 view controllers on a UIScrollView side by side. In the UIScrollViewDelegate implement scrollViewDidScroll and update the indicator line offset accordingly. 来源: https://stackoverflow.com/questions/30141474/ios-is-this-uipageviewcontroller-controlled-by

How to change the font size of a single index for UISegmentedControl?

拜拜、爱过 提交于 2019-12-11 03:12:36
问题 The way to change the font size for a UISegmentedControl would be the following: UIFont *font = [UIFont systemFontOfSize:13.0f]; NSDictionary *attributes = [NSDictionary dictionaryWithObject:font forKey:UITextAttributeFont]; [self.segment setTitleTextAttributes:attributes forState:UIControlStateNormal]; How can I change the font size for a single index in a UISegmentedControl ? Or even better, if the text doesn't fit in the segment (instead of "Above", it has "Abo...") the font size should be

Change title of segmented control with edit button?

∥☆過路亽.° 提交于 2019-12-10 23:56:21
问题 I want to have an Edit barButtonItem, when pressed I want to be able to select a segmented control and edit the segment title I select and save it. Is this possible? 回答1: Took me some time to come up with the example, but here it is!!! Here is what is in my UIViewController header file: @interface optionsViewController : UIViewController <UIPopoverControllerDelegate, UITextFieldDelegate> { IBOutlet UISegmentedControl * centerAreaSizeSelector; // Added to support this example

How to change UISegmentedControl index with animation?

随声附和 提交于 2019-12-10 20:48:27
问题 I can change selected segment of UISegmentedControl by selectedSegmentIndex , however is it possible to change index with animation? 回答1: This is not possible. You have to implement your own custom view or search for a 3rd party control that allows that. 来源: https://stackoverflow.com/questions/36379008/how-to-change-uisegmentedcontrol-index-with-animation

UISegmentedControl calls action method on changing selectedSegmentIndex programmatically

雨燕双飞 提交于 2019-12-10 19:12:48
问题 I have a a UISegmentedControl in my xib file. It is linked to an action method on value changed event in the xib file. When I programmatically set the value of selectedSegmentIndex the action method gets called mysegmentedcontrol.selectedSegmentIndex = index I was expecting that the action method would only be called when the user changes the control by touching it? This happens only for UISegmentedControl. 回答1: .h file BOOL isProgramaticallyChanged; .m file - (IBAction)segmentAction:(id

UISegmentedControl truncates segment titles

送分小仙女□ 提交于 2019-12-10 19:09:46
问题 I have a segmented control in my iPhone app that works great on ios6 but on ios7 the segment tiles are truncated (there is enough space for the text, but it truncates them anyway) self.segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar; self.segmentedControl.autoresizingMask = UIViewAutoresizingFlexibleWidth; NSDictionary *defaultTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:defaultFont, UITextAttributeFont, defaultFontColor, UITextAttributeTextColor, nil];