小编Acr*_*ogi的帖子

在Interface Builder中是否有实际*视觉设计*双视​​图(横向+纵向)的方法?

我目前的设计要求在纵向和横向视图之间进行一些很酷的动画.数据表示相当复杂,因此在图形和数据元素之间,屏幕上可能同时有大约30个按钮和标签.我创建了一个设计非常紧密的界面......现在我正在为景观视图布置元素.到目前为止,我发现这样做的唯一方法是在代码中实际布局横向视图,例如:

-(void) positionViews {
    UIInterfaceOrientation destOrientation = self.interfaceOrientation;
    if (destOrientation == UIInterfaceOrientationPortrait || destOrientation == UIInterfaceOrientationPortraitUpsideDown) {
        //---if rotating into PORTRAIT mode
        timeBGbox.frame = CGRectMake(14, 88, 134, 14);
        targetTime.frame = CGRectMake(0, 99, 150, 29);
        energyBGbox.frame = CGRectMake(156, 88, 68, 14);
        targetEnergy.frame = CGRectMake(154, 99, 70, 29);
        speedBGbox.frame = CGRectMake(234, 88, 68, 14);
        targetSpeed.frame = CGRectMake(226, 99, 48, 29);
        speedLabel.frame = CGRectMake(264, 99, 40, 36);
    } else {
        //---if rotating to LANDSCAPE mode
        timeBGbox.frame = CGRectMake(156, 12, 152, 14);
        targetTime.frame = …
Run Code Online (Sandbox Code Playgroud)

iphone landscape interface-builder ios

5
推荐指数
1
解决办法
818
查看次数

d3.js:如何创建"强制导向的图簇"

我一直在探索d3.js库,特别是力导向图创建.我仔细阅读了Bostock等人的论文,并注意到我试图创建的图的精确类型,基本上是一个力导向图,其中颜色编码区域围绕羽毛组.

这是第3栏第2行的插图,这里标有"强制导向图簇":http: //vis.stanford.edu/papers/d3

这里的代码生成基本图:http: //mbostock.github.com/d3/ex/force.html

我的问题是:动态生成区域多边形的代码是什么?

d3.js force-layout

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

d3.js ×1

force-layout ×1

interface-builder ×1

ios ×1

iphone ×1

landscape ×1