interface-builder

Why not use Interface Builder [closed]

怎甘沉沦 提交于 2020-01-04 14:34:09
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago . I have seen some people who refuse to use Interface Builder and prefer to make everything using code. Isn't this a bit tedious and

What is the internal structure of an Interface Builder .xib file?

余生长醉 提交于 2020-01-04 01:29:35
问题 What is the internal structure of a .xib file used by Interface Builder? 回答1: Well a xib file is an XML file used by Interface Builder. The header usually contains something similar to this: <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> Then they consist of 'object' entries which represent objects contained within the nib. <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> 回答2: Right click a xib file > Open As > Source Code You'll be able to see

Can't change UITextView frame size programmatically

给你一囗甜甜゛ 提交于 2020-01-03 16:55:19
问题 I've insert an UITextView in a view with Interface builder, now I would like to change its frame size so it fits the content programmatically. The problem is that the size seems locked and unchangable from code because of the constraints. If I disable in file inspector use auto-layout every object gets the constraints removed, but I only want to change the UITextView not the other objects. [textview setFrame:CGRectMake(x,y,w,h)]; // This doesn't do anything to the uitextview 回答1: If you're

TableView Cell Separator Line Not Extending Across the Entire Cell

北城以北 提交于 2020-01-03 11:47:07
问题 I am working on a new project and have used a storyboard for the UI. All of my tableViews have an issue with the line separator. The picture below shows two lines. The first is a blue one which was set in the attributes inspector. The second one is black and was added with an imageView that I placed in the cell. The line does extend to the right side of the cell but not the left. Any ideas? 回答1: first set table view 1.set separatorInset of tableview instance to UIEdgeInsetsMake(0, 0, 0, 0)

Object vs. External Object in XCode Interface Builder

蓝咒 提交于 2020-01-03 08:28:07
问题 What is the difference between Object and External Object in the IB? When should I use each? 回答1: Adding on to the other answer: You could use an 'External Object' to access a common object across multiple xib's. You could do this in other ways too, but this would be convenient. Like for example, if you have a 'big' action to be performed for button clicks over multiple xib's and if you have many such actions (and additionally if it's the same data you are performing this action on), instead

Set WKWebViewConfiguration on WKWebView from Nib or Storyboard

半城伤御伤魂 提交于 2020-01-03 07:21:06
问题 With iOS 11 Apple has added the ability set add WKWebViews outlets on your nibs and storyboards. It seems to work fine when using the default WKWebViewConfiguration that get set automatically. However, I'd like to be able to use a custom WKWebViewConfiguration. Is there anyway I can set this before, or after the WKWebView gets initialized from the nib? 回答1: Let's Example your customize configuration. NSString *jScript = @"var meta = document.createElement('meta'); meta.setAttribute('name',

How to define colors in XCodes' Interface Builder?

别说谁变了你拦得住时间么 提交于 2020-01-03 07:16:13
问题 I would like to copy colors between elements in the Interface Builder or define them using RGB values. For example, I'd like to copy the background color of a button to another button without duplicating the button. Alternatively, entering exact RGB codes in Interface Builder would suffice; that way I can make sure my buttons have the exact same color. Currently I only know how to do this programmatically, but surely there is a way to do it in Interface Builder? 回答1: To set RGB value in IB

Where is located the Unlocking Xib files option 'Reset Locking Control' (for 'Localization Locking') in xCode 5 for edition

冷暖自知 提交于 2020-01-03 04:44:06
问题 Where is located the 'Localization Locking' Option ('Reset Locking Control') for Interface builder 5 in xCode 5? In Xcode 4.6.3 I have some xib files locked using the 'Localization Locking' feature (All properties) in interface builder 4.6 to not accidentally changes the Layouts… After opening my project with xCode 5.1 it updated all the xib files to be only opened by Interface builder 5. Now I want to revert the 'Interface Builder Option' to Open with Interface Builder 4.6 BUT I CANT SAVE

UINavigationController subclass - customizing Pop

笑着哭i 提交于 2020-01-03 02:20:21
问题 Like many others, I would like to perform an action when the 'back' button is used in a UINavigationController. I am aware of some alternative approaches to this, such as adding my own button and trying to spoof the look, using viewWillDisappear and setting tags on all non-back actions that will cause the view do disappear, etc. But the one that I would like to try is subclassing UINavigationController and injecting something in popViewControllerAnimated: But I can't get a simple test case to

audio waveform visualisation with iPhone

主宰稳场 提交于 2020-01-02 20:12:38
问题 I'd like to import a track from iTunes or an external URL and display the waveform with play/pause/rewind/stop features. Can someone point me in the right path? Thanks 回答1: Recently I found a library that can display a waveform on iOS by reading the audio file directly. It's incredibly simple to use & I plan to incorporate it my next app update: FDWaveformView @GitHub 回答2: For playing music, look into MPMusicPlayerController. For information on audio waveforms check out this tutorial. 来源: