Coder Social home page Coder Social logo

ideawu / cocoaui Goto Github PK

View Code? Open in Web Editor NEW
325.0 325.0 76.0 607 KB

Build adaptive UI for iOS Apps with flow-layout and CSS properties

Home Page: http://www.cocoaui.com/

License: BSD 3-Clause "New" or "Revised" License

Objective-C 98.90% CSS 0.37% Ruby 0.73%

cocoaui's People

Contributors

ideawu avatar xusion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocoaui's Issues

CocoaUIViewer有[严重]bug!

我用CocoaUIViewer来显示demo的中的buy.xml的效果是这样的[不正常]:
222

PS:难怪昨晚我用CocoaUIViewer来调界面,怎么都不对!请大大抽空修复下吧,谢谢!

在demo中运行时这样的[正常]:
ab

与week的关系

请问cocoaui与weex是什么关系?二者的思路好像挺类似。

CocoaUI now supports <select> widget.

XML

<select>
    <option value="1">option 1</option>
    <option value="2">option 2</option>
    <option value="3">option 3</option>
    <option value="4">option 4</option>
</select>

Objective-C:

ISelect *sel = (ISelect *)[view getViewById:@"select1"];
[sel onSelectKey:^(NSString *key) {
    log_debug(@"select %@", key);
}];

Custom the style by CSS:

select{
}
select .label{
}
select .arrow{
}

Screenshot

1
2

ITable 中使用了 UIScrollView,UIScrollView自动调整高度时会,会出现控件下移的问题

问题:
UITabBarController , UINavigationController, ITable,三者混用时,特别在二级UINavigationController POP时后,ITable中的Row会出现下移问题。

解决办法:
1、在ITable.m 中viewDidLoad中增加 self.automaticallyAdjustsScrollViewInsets = NO; //禁止自动调整。
2、在init 在ITable.m 中init中增加:

    scrollFrame = CGRectMake(0, NAV_HEIGHT, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-64-50);

在ITable.m 中layoutViews中自定义修改高度:

CGSize fsize = CGSizeMake(scrollFrame.size.width,
                                  scrollFrame.size.height );
        if(!CGSizeEqualToSize(_scrollView.frame.size, fsize)){
            log_debug(@"change size, w: %.1f=>%.1f, h: %.1f=>%.1f", _scrollView.frame.size.width, scrollFrame.size.width, _scrollView.frame.size.height, scrollFrame.size.height);
            CGRect frame = _scrollView.frame;
            frame.size = fsize;
            NSLog(@"%s,%d,%f",__func__,__LINE__,self.view.frame.size.height);
            
            _scrollView.frame = frame;
            _contentFrame.size.width = self.view.frame.size.width;
        }

z-index attribute

hi sir.
can this library support z-index attribute on next version?
it will make it more easy to do some lively works

[announce] CocoaUI 1.2.4, a big step forward!

新特性:

  • 更加符合 CSS 规范(2015-11-13)
    • 因此, 它有可能和老版本的布局有一些差异, 千万要充分测试你的老代码!
  • 支持格式不合法的 HTML(2015-11-13)
    • 老版本无法识别格式不合法的 HTML, 例如有标签不正确闭合. 现在, 使用 libxml2, CocoaUI 可以像浏览器一样, 兼容格式不合法的 HTML 了!

Bug 修复:

  • 修复 ITable 上调用 beginRefresh() 不起作用的 bug, iOS 9.0(2015-11-12)
    • 在 iOS 9.0+, 当你第一次在代码中调用 beginRefresh() 时(页面渲染后不要做任何 UI 交互操作), 并没有显示下拉刷新的转圈图标. 现在已经修复了这个问题.
  • 修复 "background: url(a.png)" 不显示图片的 bug, iOS 7.0.3(2015-11-11)
  • 修复 addClass/removeClass 没有正确工作的 bug(2015-11-10)
    • 因为 1.2.4 更加符合 CSS 规范了.

不兼容的改动:

  • 删除了 IStyleUtil(2015-11-14)
  • 更加符合 CSS 规范(2015-11-13)
    • 特性, 所以有可能不是 100% 兼容老版本.
  • 对不支持的标签更友好(2015-11-13)
    • 对于 CocoaUI 不支持的标签, 统一当作文本类标签来处理.

New features:

  • More compatible with CSS specification(2015-11-13)
    • So, UI layout may act a bit different to older versions, TEST 1.2.4 with your existent codes very carefully!
  • Support malformed HTML(2015-11-13)
    • Yes, older versions of CocoaUI will not work with malformed HTML, now with libxml2, it works!

Bug fixes:

  • Fix ITable first call of beginRefresh() UI not working on iOS 9.0(2015-11-12)
    • On iOS 9.0+, if you call beginRefresh() programatically just after the UI is rendered(do not od any UI interaction), the UI stands still, but not showing a loading indicator as expected. Now it is fixed.
  • Fix "background: url(a.png)" image not showing on iOS 7.0.3(2015-11-11)
  • Fix addClass() bug, now addClass/removeClass work in the right way(2015-11-10)

Thanks to more compatible with CSS specification

Incompatible changes:

  • Remove IStyleUtil(2015-11-14)
  • More compatible with CSS specification(2015-11-13)
    • NEW feature, so it may not be 100% compatible with older versions.
  • Treats unknown tags more friendly(2015-11-13)
    • All unkown tags are treated as plain text tag

当从xml生成View时支持可变行高

demo中有一个自动行高的列子,但其中的cell是通过代码创建的。
我在xml文件中定义一个cell,然后添加到ITable中,然后修改cell中某个Label的文本,发现不支持可变的行高,是我的用法不对么?

子类代理方法会覆盖ITable中代理的方法

你好,我在试用的时候发现一个问题。
我在ITable子类中用到了UIScrollViewDelegate,实现了- (void)scrollViewDidScroll:(UIScrollView *)scrollView方法,然后页面就出问题了,我想问题应该是覆盖了ITable中的方法,像这个问题应该怎么处理呢?
谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.