• Stars
    star
    325
  • Rank 129,350 (Top 3 %)
  • Language
    Objective-C
  • License
    BSD 3-Clause "New...
  • Created over 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

CocoaUI

Build adaptive UI for iOS Apps with Flow-Layout mechanism and CSS properties.

Author Platform Language License

AAA BBB
OS iOS 11.x, 10.x, 9.x, 8.x, 7.x
Language Objective-C, Swift(see https://github.com/XiaoCC/CocoaUI-Swift)
License New BSD License
Author ideawu
Website http://www.cocoaui.com/

Demos:

Dependency

  • libxml2

Setup

  1. Download the source files from GitHub: git, .zip
  2. Use Xcode the open the IKit Project
  3. Build the schema IKit-universal, set the schema Build Configuration to Release(default is Debug)
  4. Add the header files folder and static library to you own project(see Quick Start):
  • header files folder: build/release-universal/include/IKit
  • static libarry file: build/release-universal/libIKit.a

Usage

Sample Code(Objective-C)

CocoaUI makes things ass-kicking easy! -

[superview.style set:@"padding: 10;"];

Without CocoaUI, here's the equivalent code you'd have to write using Apple's Foundation API directly:

UIView *superview = self;
UIView *view1 = [[UIView alloc] init];
view1.translatesAutoresizingMaskIntoConstraints = NO;
[superview addSubview:view1];
UIEdgeInsets padding = UIEdgeInsetsMake(10, 10, 10, 10);
[superview addConstraints:@[
    //view1 constraints
    [NSLayoutConstraint constraintWithItem:view1
                                 attribute:NSLayoutAttributeTop
                                 relatedBy:NSLayoutRelationEqual
                                    toItem:superview
                                 attribute:NSLayoutAttributeTop
                                multiplier:1.0
                                  constant:padding.top],
    [NSLayoutConstraint constraintWithItem:view1
                                 attribute:NSLayoutAttributeLeft
                                 relatedBy:NSLayoutRelationEqual
                                    toItem:superview
                                 attribute:NSLayoutAttributeLeft
                                multiplier:1.0
                                  constant:padding.left],
    [NSLayoutConstraint constraintWithItem:view1
                                 attribute:NSLayoutAttributeBottom
                                 relatedBy:NSLayoutRelationEqual
                                    toItem:superview
                                 attribute:NSLayoutAttributeBottom
                                multiplier:1.0
                                  constant:-padding.bottom],
    [NSLayoutConstraint constraintWithItem:view1
                                 attribute:NSLayoutAttributeRight
                                 relatedBy:NSLayoutRelationEqual
                                    toItem:superview
                                 attribute:NSLayoutAttributeRight
                                multiplier:1
                                  constant:-padding.right],
]];

CocoaUI supports most CSS layout and styling feature, the key of CocoaUI is Flow Layout.

=======

Screenshot

Learning CocoaUI

Documentation

http://www.cocoaui.com/en/docs

CocoaUI C Sharp Binding

https://github.com/shshshdy/CocoauiCsharp

About Source Code

IKit

The CocoaUI library.

IObj

A dynamic JSON object/model library for Objective-C.

Test

Demo app for CocoaUI

CocoaUIViewer

A Write and Seen tool helps you easily develop XML UI.

More Repositories

1

ssdb

SSDB - A fast NoSQL database, an alternative to Redis
C++
8,173
star
2

icomet

A C1000K comet/push server built with C++, for web and mobile app
C++
1,522
star
3

Objective-C-RSA

Doing RSA encryption and decryption with Objective-C on iOS
Objective-C
1,151
star
4

c1000k

A tool to test if your OS supports 1 million connections(c1000k/c1m)
C
596
star
5

sim

Simple C++ network server framework
C++
351
star
6

ssdb-rocks

ssdb with rocksdb, rocksdb client-server support
C++
140
star
7

iphp

An everyone can understand PHP framework for web development
PHP
138
star
8

tftpx

TFTP server and client implementation in C
C
138
star
9

cocoaui-demos

Build Native iOS Apps with Simple HTML+CSS, Flow Layout
Objective-C
97
star
10

ssdb-docs

SSDB documentation source code
HTML
90
star
11

icomet-demos

Demos for icomet server
Java
85
star
12

ssdb-bin

SSDB pre-compiled binary
81
star
13

cpy

Cpy provides you a way to write Python codes in C syntax!
Python
62
star
14

webrtc-demo

WebRTC GIPS C/C++ API demos
C++
57
star
15

rtc

Real-Time Communication Infracture
C++
56
star
16

snappy-ios

The Snappy compression library for iOS
C++
37
star
17

CocoaUIDemo

moved to https://github.com/ideawu/cocoaui-demos
36
star
18

js-lottery

JS网页抽奖工具
HTML
14
star
19

libfast

Simple FIX and FAST protocol implementation
C++
13
star
20

tableview

JavaScript TableView, PagerView, SelectorView
HTML
12
star
21

phpvoip

SIP implement with PHP
PHP
10
star
22

ParallaxScroll

JavaScritp Parallax Scrolling, Swipe guesture
JavaScript
8
star
23

endlessssh

Tunneling SSH over HTTP
Python
8
star
24

pyhttp

Event driven HTTP library for Python
Python
6
star
25

ios_live_streaming

iOS/macOS 视频直播技术框架
Objective-C
6
star
26

manual

常用操作手册
6
star
27

iOSScrollPicker

iOS Scroll Picker
Objective-C
5
star
28

soc

Simpler Objective-C/Standard Objective-C Library
Objective-C
4
star
29

leetcode

C++
3
star
30

fifo_test

Shows how to properly read and write FIFO on Linux
C++
2
star
31

tovi-js

A JavaScript image gallery and HTML slider, with iPhone swipe effect.
CSS
1
star
32

libave

Audio Video Engine Library
C++
1
star