storyboard

Xcode 8 Storyboard warnings for Navigation Bar width [duplicate]

亡梦爱人 提交于 2019-12-18 11:46:09
问题 This question already has answers here : Warning frame for “Navigation bar” will be different at run time appears in Xcode 8 Swift 3 (13 answers) Closed 2 years ago . I am getting constraint warnings for my Navigation Bar's for each of my Navigation Controllers in each of my storyboards in Xcode 8. To get rid of the warning I set the Navigation Controller's Simulated Metrics->Top Bar setting from Inferred to None and then back again, and the warning goes away. Until the next time the

How to set up my iOS storyboard to bounce like Instagram Stream?

落爺英雄遲暮 提交于 2019-12-18 11:43:10
问题 I am building an app with a stream of social content and am trying to get the behavior of how instagram does it's stream in app. So basically a top header that scrolls off the screen but bounces between that and the content. I can make the top header scroll off the screen and I can make the view not bounce but I want to use Pull to refresh and that ends up going above the "faux" nav bar UIView . I know that a normal Navbar will produce this but this one that scrolls off is a different story.

Infinite loop when overriding initWithCoder

≡放荡痞女 提交于 2019-12-18 11:11:23
问题 I have a UIViewController with some controllers and some views. Two of these views (Grid Cell) are other nibs. I've got outlets from the Grid Cells to File's Owner, but they aren't loaded automatically. So I try to override GridCell.m 's initWithCoder . This starts an infinite loop. I know it's possible to just override initWithFrame and add the subview from code, but this is not what I want. I want to be able to move the view around in Interface Builder and have Xcode initialize the view

Set a border for UIButton in Storyboard

孤人 提交于 2019-12-18 11:10:50
问题 I can't get a border onto my buttons in XCode 5 without setting them directly in the code. Is it possible that there's no way to do this on the storyboard without making a custom background image? 回答1: You can use key path. For example the corner radius ( layer.cornerRadius ) as describe on the image. You will not be able to see the effects on storyboard, cause this parameters are evaluated at runtime. Now you can use a swift category in UIView (code bellow the picture) in with @IBInspectable

Setting the default tab when using storyboards

痞子三分冷 提交于 2019-12-18 10:09:04
问题 Can anyone please tell me how to set the default tab when using storyboards in iOS. I can't seem to figure out how to accomplish this. Thank you 回答1: You can use one of these two methods: tabBar.items = tabBarItems; tabBar.selectedItem = [tabBarItems objectAtIndex:0]; or a direct method from the object [tabBar setSelectedItem:myUITabBarItem]; or you can combine them to do this: tabBar.items = tabBarItems; [tabBar setSelectedItem:[tabBarItems objectAtIndex:0]]; but i havent tested that method

Add UI elements to UIScrollView?

女生的网名这么多〃 提交于 2019-12-18 09:45:44
问题 I have a scroll view. On the scroll view I have added many necessary UILabels and UIButtons etcs. Now I want to add MORE labels and buttons but I have no room on the interface of the view to add them, otherwise they will overlap the other elements. How do I add more UI elements so that they can be interacted with when the user scrolls? I was thinking if I hold the UIelement over the bottom of the scroll view, the scroll would "scroll down" and present me with more space. 回答1: The key thing

System.Windows.Media.Animation Warning: 6

耗尽温柔 提交于 2019-12-18 09:16:13
问题 When I run animation in wpf using storyboard I am getting following error in output window. System.Windows.Media.Animation Warning: 6 : Unable to perform action because the specified Storyboard was never applied to this object for interactive control.; Action='Stop'; Storyboard='System.Windows.Media.Animation.Storyboard'; Storyboard.HashCode='57850459'; Storyboard.Type='System.Windows.Media.Animation.Storyboard'; TargetElement='System.Windows.Media.Animation.Storyboard'; TargetElement

Stretching and kerning type, not working in Storyboard with @IBDesignable

醉酒当歌 提交于 2019-12-18 09:07:08
问题 Here is a IBLabel which tracks / stretches the font. It works perfectly in the build. But the change doesn't show live in Storyboard. // UILabel, but you can set // the tracking (that's the overall amount of space between all letters) // and streching (actually squeeze or stretch the letters horizontally) // Note: it's very common that typographers need you to adjust these. import UIKit @IBDesignable class StyledLabel: UILabel { @IBInspectable var tracking:CGFloat = 0.8 // values between

SetTarget vs RegisterName/SetTargetName

╄→гoц情女王★ 提交于 2019-12-18 08:58:35
问题 Here's a simple program which animates the Y2 property of a Line shape. Note that I use the SetTarget method to target the Line . This program works fine. using System; using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SoGeneratingAnimatedLine { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var canvas = new Canvas(); Content = canvas; var sb =

Storyboard Internal Inconsistencies

落花浮王杯 提交于 2019-12-18 07:44:52
问题 I have a similar situation explain on this thread (XCode 5 Storyboard Internal Inconsistencies), but I installed the final version of the Xcode and never installed any beta version. Additionally, I can't add comments in previous thread cause I don't have enough points. So i need to ask my specific case. In XCode 5, I have a problem with all of my projects "The document 'main.storyboard' has X internal inconsistencies that were found and repaired. Please save this document to fix the