autoresize

A div with auto resize when changing window width\height

血红的双手。 提交于 2019-12-17 22:23:39
问题 I've looked everywhere . and still couldn't come up with sample code of a very "basic" idea: A div that is taking 90% of the screen size and it is adjusting itself whenever the browser size changes (to take 90% of the relative screen) The nested divs inside it should re size themselves as well.. is it even possible? EDIT: width 90% is not working when i try to re size the screen vertically. 回答1: Use vh attributes. It means viewport height and is a percentage. So height: 90vh would mean 90% of

Autoresizing issue in Xcode 8

∥☆過路亽.° 提交于 2019-12-17 15:54:13
问题 === EDIT ======== This issue is now solved in Xcode 8.1 . I have checked. ================ I don't know auto-layout properly. So, I am using autoresizing option in my all apps and it's fine for me. I am able to fulfill my all requirements by this without any issue. Now in Xcode 8, I have migrated my old swift project to swift 3. Now issue arises. See in image, I have set Autoresizing, and its working fine without issue in all devices until now and this project is live in AppStore, so that I

resize superview after subviews change dynamically using autolayout

心不动则不痛 提交于 2019-12-17 15:02:15
问题 I cant for the love of god the the hang of this resizing superview. I have a UIView *superview with 4 UILabels . 2 function as header for the 2 others. The content in all 4 are dynamic coming from database. SizeToFit vs SizeThatFits:(CGSize) vs UIView systemLayoutSizeFittingSize: , passing either UILayoutFittingCompressedSize or UILayoutFittingExpandedSize . I use autolayout programatically and have set the superview height to be equal or greater to a dummy number. where and how do I use

iPhone 4 & 5 Autoresize Vertical Space

末鹿安然 提交于 2019-12-13 06:02:09
问题 I built my views in Interface Builder for iPhone 4 dimensions. I thought that the Autoresize Constraints in iOS 6 will take care of the resizing automatically. The screenshot shows the Top Space constraint that Xcode added automatically. It says that the relationship between the top and the bottom orange view must be 332 points. When viewed in iPhone 5, the orange button is stretched all the way to the bottom as you can see in the screenshot below. When changing the relation to Greater Than

WPF Square auto-size to parent container

笑着哭i 提交于 2019-12-13 01:25:09
问题 I have a UniformGrid object in my WPF project that has 2 rows and 3 cols and its width and height are set to auto (with both alignments set to Stretch). This grid will hold 6 squares that I want to fill as much of their cell as possible and be centered horizontally and vertically. What do I need to be added to allow for the squares to increase/decrease their length/width based on the dynamic size of the parent? I.E., when the window is resized. Here is my xaml so far: <UniformGrid Rows="2"

Autoresize UIScrollView

梦想的初衷 提交于 2019-12-12 19:18:12
问题 I made a UIViewController, which programatically generates a UIScrollView. Everything's fine, but when I rotate the Device, the UIScollView should resize so it takes the complete width of my View. Is there a way to do that without rebuilding the complete UIScrollView ? Thx a lot ! Sebastian This is called in my viewDidLoad: -(void)buildmyScroller { myScroller = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 800, 768, 100)]; //...adding some subviews to myScroller thumbScroller.contentSize

Automatically re-sizing a component within a GridBagLayout

风流意气都作罢 提交于 2019-12-12 10:58:02
问题 In this code I have a panel in the GridBagLayout which contains a JLabel and a JTextField . import java.awt.*; import javax.swing.*; public class Simple { JFrame simpleWindow = new JFrame("Simple MCVE"); JPanel simplePanel = new JPanel(); JLabel lblSimple; JTextField txtSimple; public void numberConvertGUI() { simpleWindow.setBounds(10, 10, 420, 80); simpleWindow.setMinimumSize(new Dimension(420, 80)); simpleWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); simpleWindow.setLayout(new

How to resize App for Iphone 5?

久未见 提交于 2019-12-12 10:22:40
问题 I'm creating a universal app. Everything is looking great on the ipad/iphone but when I switch my storyboard view to the iphone 5 or run the simulator as the iphone 5, there is an inch or so at the bottom of just whitespace. I've tried turning on autolayout and using that, but with no luck. I've also tried to create -568h@2x.png versions of my images to see if it will auto-resize with those, but it doesn't. Does anyone have any other ideas I could perhaps try? Thank you! 回答1: I found the way

How to disable Chart axis autosize

放肆的年华 提交于 2019-12-12 02:55:25
问题 I need to stop autosizing (or autoscaling) of Y Axis in c# chart and set it manually. Any advice? Thanks 回答1: You can set the minimum and maximum of the Y axis like so: chart.ChartAreas[0].AxisY.Minimum = 0; chart.ChartAreas[0].AxisY.Maximum = 10; 来源: https://stackoverflow.com/questions/9412781/how-to-disable-chart-axis-autosize

issues with label text layout while changing the font for app using auto layout

烈酒焚心 提交于 2019-12-12 02:05:22
问题 I am working on auto layout in my app.I have a functionality to increase the font size of entire app through slider movement.The issue is when i increase the font size the text of the label turns into ellipses. I have given the constraints to my label a fixed width and increasing variable height but this doesn't solve any problem. Do i need to give line break mode (word-wrap) and specify the number of lines for every text or there any other solution to this ? Any help will be appreciated. 回答1