uibutton

How do you exclude a UIButton from VoiceOver?

瘦欲@ 提交于 2020-01-02 02:19:12
问题 I have a UIButton that is sometimes blank (no text or image). When it is blank, I want VoiceOver to skip over it. I've tried the following things, but none of them do the job -- the button still gets highlighted as the user swipes through the views: Set the button and all of its subviews' .accessibilityTraits to UIAcessibilityTraitNotEnabled. This prevents VoiceOver from saying anything when the button is selected, but it still allows the button to be selectable by VoiceOver. Disable the

UIButton on different Y level can't be focused on tvOS

守給你的承諾、 提交于 2020-01-02 01:19:26
问题 I started developing apps for Apple TV and I have this problem whit buttons. I have a screen where are several buttons on bottom of the screen and then there is one, which is in the middle (see screenshot to understand). The problem is that I can't get focused the middle button. Focus is only on bottom three buttons. The problem is obviously caused by the Y position , when I move the button on bottom of the screen, it gets focused. Buttons are created in storyboard, there is no code in

Drag and drop UIButton but limit to boundaries

天涯浪子 提交于 2020-01-01 19:53:24
问题 I’m not asking for givemesamplecodenow responses, just a nudge in the right direction would be much appreciated. My searches haven’t been any good. I have a UIButton that I am able to move freely around the screen. I would like to limit the drag area on this object so it can only be moved up and down or side to side. I believe I need to get the x,y coordinates of the boundaries and then restrict movement outside this area. But that’s a far as I have got. My knowledge doesn’t stretch any

UIButton Rounded Rect unwanted 3D effect

余生长醉 提交于 2020-01-01 19:53:08
问题 I had a couple of UIButtons on a nib of type RoundedRect which before iOS 6 looked nice and flat. In iOS 6 though they've acquired a 3D effect border which I cannot get rid of (I'd supply a pic but my reputation is too puny). Can anybody suggest how to get the nice flat look back? I'm sure this will turn out to be the stupidest question I've ever asked and that the answer will be so simple I'll kick myself for a week. But I can't find it and any help would be much appreciated. 回答1: I don't

Drag and drop UIButton but limit to boundaries

白昼怎懂夜的黑 提交于 2020-01-01 19:53:03
问题 I’m not asking for givemesamplecodenow responses, just a nudge in the right direction would be much appreciated. My searches haven’t been any good. I have a UIButton that I am able to move freely around the screen. I would like to limit the drag area on this object so it can only be moved up and down or side to side. I believe I need to get the x,y coordinates of the boundaries and then restrict movement outside this area. But that’s a far as I have got. My knowledge doesn’t stretch any

User list to follow using parse and swift

笑着哭i 提交于 2020-01-01 19:52:29
问题 I've been working on it from 2 weeks now, I've Instagram like app, where user can signUp and Login using Parse backend. Now after signUp a segue is made for the next screen called "userListTableViewController" here users will be allowed to follow the already existing users. Now i trying to retrieve data in NSMutableArray and show them as follows: import UIKit class userListTableViewController: UITableViewController { var data:NSMutableArray = NSMutableArray() var isFollowing = [PFObject:Bool]

UIButton Rounded Rect unwanted 3D effect

自古美人都是妖i 提交于 2020-01-01 19:52:10
问题 I had a couple of UIButtons on a nib of type RoundedRect which before iOS 6 looked nice and flat. In iOS 6 though they've acquired a 3D effect border which I cannot get rid of (I'd supply a pic but my reputation is too puny). Can anybody suggest how to get the nice flat look back? I'm sure this will turn out to be the stupidest question I've ever asked and that the answer will be so simple I'll kick myself for a week. But I can't find it and any help would be much appreciated. 回答1: I don't

UIButton Semi-Transparent Border

回眸只為那壹抹淺笑 提交于 2020-01-01 19:23:12
问题 I have a custom button and the border is supposed to be semi-transparent white. If I do this: - (void) awakeFromNib { self.layer.cornerRadius = 6.0f; self.layer.borderWidth = 4.0f; self.layer.borderColor = [[UIColor colorWithWhite:1.0f alpha:0.5f] CGColor]; } I get this - transparency but of the original button color: The border is semi-transparent but the color of the button. 回答1: Set the color of a sublayer to the color you want the button to be (don't set the background color of the button

How UITableView show two different arrays one at a time?

别等时光非礼了梦想. 提交于 2020-01-01 14:06:14
问题 The below Code works but not as i wish.i want that when i click UIbutton its automaically update the new value in UITableview instead of old value.Below Code works only when i press the UIbuttons and after that when i scroll the UITableview then it update the UItableview with new values. In my application i using UITableview as Subclass of my mainclass.as image show below I add Tableview in my Mainclass which is "testingViewController" like this way In testingViewController.h #import

How to properly create a UIButton that resizes to the text length in Xcode 4?

混江龙づ霸主 提交于 2020-01-01 11:51:06
问题 In Xcode 4 you should be able to design UI interfaces that do resize based on their content. Still it looks that the are some missing pieces regarding how to obtain this. I have a button that is configured in the XIB file to resize to the right and it has plenty of space to do that. The problem is that it doesn't seam to resize the button when the label is updated. This can be fixed by adding a [button sizeToFit]; after the label is changed. Still I am looking for a solution that works