autolayout

Behavior changes for updateViewConstraints in iOS 8

自古美人都是妖i 提交于 2020-01-01 10:40:23
问题 I notice some small graphical glitches while testing one of my app under iOS 8: some UIViews elements are not in the right place, others have not the right size. In a first step, I use storyboard, Auto-Layout and constraints. Then I programmatically tune constraints to perfectly suits devices' screen size, using updateViewConstraints . Perfect on iOS 7 but with some glitches on iOS8 as on following picture: ./Users/dominiquevial/Documents/Informatique/Dev/Novae Marathon/_log/captures/iOS8 -

Self-Sizing (Dynamic Height) Cells in iOS 8 - Possible without Custom UITableViewCell?

ε祈祈猫儿з 提交于 2020-01-01 09:16:16
问题 Is it possible to self-size a UITableViewCell in iOS 8 without creating a Custom UITableViewCell? I thought that the standard UITableViewCell types (UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, UITableViewCellStyleValue2) had built in auto layout constraints. This is confirmed by the fact that the constraints for non-custom cells cannot be changed in Storyboard. But when I use a non-custom cell of type UITableViewCellStyleValue1, set it up in

Self-Sizing (Dynamic Height) Cells in iOS 8 - Possible without Custom UITableViewCell?

↘锁芯ラ 提交于 2020-01-01 09:16:05
问题 Is it possible to self-size a UITableViewCell in iOS 8 without creating a Custom UITableViewCell? I thought that the standard UITableViewCell types (UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, UITableViewCellStyleValue2) had built in auto layout constraints. This is confirmed by the fact that the constraints for non-custom cells cannot be changed in Storyboard. But when I use a non-custom cell of type UITableViewCellStyleValue1, set it up in

Gephi可视化(二)

强颜欢笑 提交于 2020-01-01 07:30:56
  继在园子里写的《Gephi可视化(一)——使用Gephi Toolkit创建Gephi应用》介绍了如何使用Gephi Toolkit工具集进行可视化编程后,本篇对Gephi Toolkit进行一个详尽的介绍,了解其工作原理以及与Gephi应用程序之间的差异,Gephi Toolkit对于平台的要求使用方法,最后通过比较可视化工具集Prefuse,列举两种可视化工具之间的相似之处。   Gephi Toolkit是一个标准的java类库,任何java工程都可以引入使用(包括eclipse、netbeans等),该类库中包含了Gephi中必要的模块,如Graph、Layout、Filters、IO等。   该工具包只有一个jar文件,可以在java应用中使用,其保留了Gephi的绝大部分特性。    官网主页: http://gephi.github.io/toolkit/    GitHub主页: https://github.com/gephi/gephi-toolkit-demos   工作原理:   Gephi是基于模块化的思想设计的,其真正的体现了高内聚低耦合的思想。每个模块负责不同的职责,比如有专门负责图形结构的Graph,有专门用于布局的Layout。这里的Gephi Toolkit就是剥离了Gephi源码中的user interfaces modules

ios change constraint programmatically

淺唱寂寞╮ 提交于 2020-01-01 05:31:12
问题 I am using autolayout with a constraint. The top space to superview is 100 I now want to change this so that when the user rotates the device to landscape The top space to superview is 50 Can this be done at design time? How can this be done at runtime? 回答1: Well, if your 50 px for landscape and 100 for portrait can somehow be derived by relations to sibling subviews and fixed offsets to the bounds of superview, then yes, this can be done "at design time", and that's actually what auto layout

Swift: Reusable UIView in storyboard and sizing constraints

a 夏天 提交于 2020-01-01 05:15:06
问题 I'm trying to create a reusable UIView in Swift that I can plug into my Storyboard view controllers. My key issue right now is that the reusable UIView "widget" doesn't fully fit into the UIView box in the storyboard. I followed this tutorial to set up the reusable UIView widget Created a subclass of UIView and a corresponding .xib -- and connected these: import UIKit class MyWidgetView: UIView { @IBOutlet var view: UIView!; required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder

Is it possible to have a UIImageView inside of a UIScrollView zoom in and out, but stick to center with Auto Layout?

a 夏天 提交于 2020-01-01 05:04:12
问题 Long story short, I'm trying to build functionality similar to Photos.app. I have a UIScrollView with a UIImageView inside of it set up in the Storyboard. Zooming works, but I'm having trouble keeping it centered. In all my frame based scroll view implementations I've centered it as follows, which works beautifully: - (void)scrollViewDidZoom:(UIScrollView *)scrollView { CGRect newImageViewFrame = self.imageView.frame; // Center horizontally if (newImageViewFrame.size.width < CGRectGetWidth

Animating Auto Layout changes concurrently with NSPopover contentSize change

99封情书 提交于 2020-01-01 03:27:04
问题 I'm attempting to reproduce the iTunes 11 behavior of navigable views within a popover. I can't seem to find a way to get my animation to happen at the same time as the popover's contentSize change happens, though. The basic setup I have is a custom view subclass MyPopoverNavigationView with two subviews: the old and new views that I want the popover to navigate between. The popover's contentViewController has a MyPopoverNavigationView instance as its view . I do this: // Configure

How to align two buttons equidistance from the centre of the UIView

戏子无情 提交于 2019-12-31 22:38:41
问题 I am working with auto layout . Facing on interesting issue . Fortunately overcame from it for the time but need to know the best way to solve it . Problem : As showing in the above figure I have couple of buttons . Both needed to place at equidistance width from the centre of the UIView (bold vertical line is centre of the view). Also I have to apply to constraint in such a way that distance between the button will be automatically adjusted. for e.g. the distance should be 25% of the device

Applying autoLayout constraints to multiple objects

假如想象 提交于 2019-12-31 07:55:28
问题 I am playing with autoLayout constraints in iOS My use case is this way, I will better explain with images I am using a custom cell for UITableViewCell, through autolayout I have set constraints for text and divider line below and they obey autolayout constraints. Now you can see the yellow vertical strip on the left. I have not set any constraints for it, so when the cell height is normal, it covers the whole cell, but when cell height increases, it doesnt increase and fill the whole cell. I