interface-builder

Interface Builder XIB Compiler error

只谈情不闲聊 提交于 2020-01-02 18:07:18
问题 I get this error message when connecting two UISwipeGestureRecognizers to a single view in my project inside of a XIB file (though not in a new project, curiously). Anybody know what this error means? It is a compile error, not a runtime error. I'm using Xcode 4.4 (this error doesn't happen on Xcode 4.5 actually). This is an error from inside interface builder. Assertion failure in -[IBCocoaTouchToolObjectPackage connectionsByProcessingConnections:], /SourceCache/IBSimulatorComponents

Interface Builder XIB Compiler error

落爺英雄遲暮 提交于 2020-01-02 18:07:12
问题 I get this error message when connecting two UISwipeGestureRecognizers to a single view in my project inside of a XIB file (though not in a new project, curiously). Anybody know what this error means? It is a compile error, not a runtime error. I'm using Xcode 4.4 (this error doesn't happen on Xcode 4.5 actually). This is an error from inside interface builder. Assertion failure in -[IBCocoaTouchToolObjectPackage connectionsByProcessingConnections:], /SourceCache/IBSimulatorComponents

Core Animation and Anti Aliased Fonts on the Mac

可紊 提交于 2020-01-02 04:53:22
问题 I'm trying to create a view that is backed by a Core Animation layer. However, when I enable the layer, my labels start to look slightly jagged. I've attached a demonstration of difference: I know it is subtle, but it is driving me crazy (especially for smaller fonts). Any way I can get the Core Animation layer labels to be anti-aliased? 回答1: Nitpick: the Core Animation layer is anti-aliased, but at a lower quality – it doesn’t use sub-pixel anti-aliasing. The reason for this is that sub

How to adjust super view 's height base on subview's size in XIB?

和自甴很熟 提交于 2020-01-02 03:48:21
问题 In xcode 6 ,i create a xib for a custom view (named: ViewA,got a RED background color) ,and ViewA's xib got a file size 600*600, in ViewA ,I put a subview labelB (got a GREEN background color )in it ,and labelB's numberOfLines = 0 ,so labelB'height is variable , I want the ViewA 's height changed based on labelB's height (e.g ViewA.bottom = labelB.bottom + 10), and I have already pin the labelB's top,bottom,trailing,leading to ViewA, but it still doesn't !work ,the ViewA's height is always

How to use custom UIView subclass in XIB editor with Monotouch?

纵然是瞬间 提交于 2020-01-02 03:45:10
问题 I have added a XIB based UIViewController to my solution and dragged some UIViews into it. Now I want some of the views not to be UIView but RoundedRectView (https://github.com/Krumelur/RoundedRectView) which inherits from UIView . How to achieve this? I tried to change the class in Interface Builder but that did nothing. Then I manually modified the designer.cs file but that resulted in a failure. Then I tried modifying the fake ObjC code but that failed too. (I'm using Xcode 4.2 and MD 2.8

Working with constraints in interface builder

三世轮回 提交于 2020-01-02 03:44:14
问题 So, I can't get my head around constraints in interface builder. I can't add them myself - interface builder seems to think that it knows best. I also can't take them away (I can convert to a "user" constraint, then delete, but interface builder will just replace it with the same constraint again). I thought constraints were supposed to help you with changing layouts and all sorts - i.e. building views for iPhone 5 and earlier ones. Also, moving from portrait mode to landscape mode. I can't

How to set text in a UITextView as a link to a URL

巧了我就是萌 提交于 2020-01-02 03:23:18
问题 I have some text in a UITextView, that I would like to have show as blue, and serve as a link to a website. How do I do that in interface builder? 回答1: In Interface Builder, select the UITextView, open the inspector, go to the Text View Attributes tab, then make share "Detect Links" is checked. This only works for items that look like links (http://stackoverflow.com) For making arbitrary links, then you will want to use a UIWebView instead. 来源: https://stackoverflow.com/questions/2489950/how

UIViewController throwing unrecognized selector exception on prepareForSegue

老子叫甜甜 提交于 2020-01-02 02:46:26
问题 I'm trying to follow along the Stanford CS193p iOS programing lectures. One of the demo programs, called "Happiness" creates two UIViewControllers, a "PsychViewController" and a "HappinessViewController." It segues from the PsychViewController to the HappinessViewController using a target action method. The following code keeps throwing this exception: "-[UIViewController setHappiness:]: unrecognized selector sent to instance" Here's the offending code: -(void)prepareForSegue:

How to set View height as percentage of the screen height in Storyboards with XCode 7

怎甘沉沦 提交于 2020-01-02 02:31:08
问题 I need to design the view like below image and I have tried with fixed heights and also tried compact width and regular height and regular width and compact height but those scenarios did not worked for me. How can i set View height as percentage of the screen height in Storyboards? I'm using Xcode 7 回答1: Basically you need to act on the multiplier property of an height equal constraint. To do that while pressing CTRL, drag from the view to its superview and select equal heights constraint ,

Alternate to control+drag to connect view element with file owner in xCode interface builder?

江枫思渺然 提交于 2020-01-02 01:10:42
问题 Working on an iPhone application through a TightVNC connection into a Mac Mini; the control+drag operation in Interface Builder to connect a view element to file owner doesn't work - I don't see the connecting line. It does work when I connect keyboard, mouse and monitor to the Mini and work on it directly, however it is a lot more convenient for me to run it through a VNC connection. Must be some quirk of the TightVNC connection that is preventing this. I tried different TightVNC settings