C4iOS

所属分类:iPhone/iOS
开发工具:Swift
文件大小:0KB
下载次数:0
上传日期:2021-02-07 16:04:43
上 传 者sh-1993
说明:  C4是一个开源的创造性编码框架,它利用本地iOS编程的能力,并具有简化的a...
(C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction.)

文件列表:
.swift-version (4, 2018-09-24)
.swiftlint.yml (121, 2018-09-24)
.travis.yml (304, 2018-09-24)
C4.podspec (977, 2018-09-24)
C4.xcodeproj/ (0, 2018-09-24)
C4.xcodeproj/project.pbxproj (83225, 2018-09-24)
C4.xcodeproj/project.xcworkspace/ (0, 2018-09-24)
C4.xcodeproj/project.xcworkspace/contents.xcworkspacedata (147, 2018-09-24)
C4.xcodeproj/project.xcworkspace/xcshareddata/ (0, 2018-09-24)
C4.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (238, 2018-09-24)
C4.xcodeproj/xcshareddata/ (0, 2018-09-24)
C4.xcodeproj/xcshareddata/xcschemes/ (0, 2018-09-24)
C4.xcodeproj/xcshareddata/xcschemes/C4-iOS.xcscheme (3592, 2018-09-24)
C4.xcodeproj/xcshareddata/xcschemes/C4-tvOS.xcscheme (3598, 2018-09-24)
C4/ (0, 2018-09-24)
C4/C4.h (1341, 2018-09-24)
C4/Core/ (0, 2018-09-24)
C4/Core/Color.swift (14510, 2018-09-24)
C4/Core/EventSource.swift (5130, 2018-09-24)
C4/Core/Foundation.swift (2428, 2018-09-24)
C4/Core/Math.swift (5943, 2018-09-24)
C4/Core/Path.swift (11632, 2018-09-24)
C4/Core/Point.swift (6285, 2018-09-24)
C4/Core/Rect.swift (9958, 2018-09-24)
C4/Core/Size.swift (5461, 2018-09-24)
C4/Core/Transform.swift (11058, 2018-09-24)
C4/Core/Vector.swift (13122, 2018-09-24)
C4/Info.plist (774, 2018-09-24)
C4/UI/ (0, 2018-09-24)
C4/UI/Animation.swift (6524, 2018-09-24)
C4/UI/Arc.swift (3270, 2018-09-24)
C4/UI/AudioPlayer.swift (10382, 2018-09-24)
C4/UI/Camera.swift (7140, 2018-09-24)
C4/UI/CanvasController.swift (2670, 2018-09-24)
C4/UI/Circle.swift (1715, 2018-09-24)
C4/UI/Curve.swift (3876, 2018-09-24)
C4/UI/Ellipse.swift (1819, 2018-09-24)
C4/UI/Filter.swift (2456, 2018-09-24)
C4/UI/Filters/ (0, 2018-09-24)
... ...

![C4](http://www.c4ios.com/images/c4logo.png) # Code, Creatively. C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction. Built on top of Swift, C4 puts the power of UIKit and Core Animation at your disposal, allowing you to create inventive digital interactions with far less time and effort. Plus, you get all the interactivity, fun and expressiveness of Swift. Your apps will run lightning-fast. The API of C4 is simple and streamlined allowing beginners to get into programming very easily. For seasoned developers, C4 can be dropped into any existing project with as little effort as linking any other native framework. With C4, you’ll save a ton of time when working with interactions, animation and media. ## Expressive C4 brings your ideas to life by allowing you to focus on experimenting, designing, visualizing and building rather than on learning low-level technologies. Objects are consistent and intuitive—they all essentially work the same way. C4's language has been designed to be as simple and expressive as possible. For example, C4 compresses the access of properties: ```swift let m = movie.width ``` Instead of this: ```swift let m = movie.frame.size.width ``` Animating both view and property changes in C4 is much cleaner, and looks like this: ```swift ViewAnimation(duration: 0.5) { shape.center = self.canvas.center shape.lineWidth = 5 }.animate() ``` Whereas using UIKit + Core Animation you'd have to do something like this: ```swift UIView.animate(withDuration: 0.5) { v.center = self.view.center } CATransaction.begin() CATransaction.setValue(0.5, forKey: kCATransactionAnimationDuration) if let shapeLayer = v.layer as? CAShapeLayer { shapeLayer.lineWidth = 5 } CATransaction.commit() ``` C4 takes advantage of all of Swift’s modernity: closures, tuples, generics, interaction, structs, error handling. And, YES, you can even do this: ```swift let bananaName = "Jimmy".banana ``` Check the [Swift Overview](https://developer.apple.com/swift/) for more. ## Easy To Learn Through both its simplified API and consistent objects, C4 is incredibly easy to learn compared to the frameworks it’s built upon: UIKit, Core Animation, etc. C4’s language has been designed to make it easy for both novice and experienced programmers to pick up and use right away. ## Well Supported The C4 team has always been highly committed to publishing excellent documentation, examples and tutorials for learning how to program with C4. The current release of C4 also includes a full end-to-end tutorial that will walk you through the design, creation and publication of a full-blown app: COSMOS [Get COSMOS from the App Store](https://itunes.apple.com/us/app/c4smos/id985883701?ls=1&mt=8) [Build COSMOS from start to finish](http://www.c4ios.com/cosmos) We’re currently converting over 200 code examples and 30 tutorials to C4's new modern syntax. These examples and tutorials (coming soon) guide new users through core concepts and provide seasoned developers with the reference they need to keep up the pace. ## Powerful Originally based on Objective-C, C4 now takes entire advantage of the Swift programming language—which itself was built to be fast and powerful. Where Swift has been tuned to make intuitive, natural coding perform best, the guts of each component in C4—every class, every method and every structure –make that performance sing. Through C4 you are able to work with media, animations and interactions in a way that dissolves the differences between the many frameworks you need to create beautiful user experiences. It seamlessly combines many important components of UIKit, Core Animation, Core Graphics, AVFoundation and QuartzCore. ## Multipurpose C4 is built for anyone who wants to build beautiful user experiences for iOS and has been designed to reach an incredibly broad set of possible uses. This flexibility is one of the most important aspects of C4, demonstrating its strength across a variety of different use cases and disciplines. C4 has been used for: - Prototyping - Mobile Applications - Data Visualization - Interactive Artworks - Computational Design Education - Communication Design - Print Design ## Simplicity Simplicity is a major accomplishment for C4. Across the board, C4 is simple to learn, to use, to read and to adopt. C4 reduces the amount of code you need to the most powerful essentials. Take movies, for example. Instead of needing to AVQueuePlayer, AVPlayerItem, navigating asset tracks and learning how to load files through NSBundle, you only have to create a movie from its file name and add it to the canvas: ```swift func setup() { let movie = Movie("halo.mp4") canvas.add(movie) movie?.play() } ``` Using UIKit + AVFoundation, you'd have to construct the movie object from scratch like this: ```swift func viewDidLoad() { guard let url = Bundle.main.url(forResource: "halo.mp4", withExtension: nil) else { fatalError("File not found") } let asset = AVAsset(url: url) let player = AVQueuePlayer(playerItem: AVPlayerItem(asset: asset)) player.actionAtItemEnd = .pause let movieLayer = AVPlayerLayer(player: player) movieLayer.videoGravity = .resize let tracks = asset.tracks(withMediaType: .video) let movieTrack = tracks[0] let size = movieTrack.naturalSize movieLayer.frame = CGRect(x: 0,y: 0,width: size.width,height: size.height) self.view.layer.addSublayer(movieLayer) player.play() } ``` … And a whole lot more. ## Open Source C4 is an open-source project licensed under the [MIT License](https://en.wikipedia.org/wiki/MIT_License). It can be used freely in educational, artistic and even professional settings. The project is open to anyone who wants to contribute, and the project’s code, documentation, and process are completely available for you to read through, learn from and take advantage of. Ongoing commitment by our core team and other developers guarantees that C4 will be constantly updated and focused on user’s interests. ### Contributing There are many ways to contribute to C4 and we really appreciate any contributions. It can be anything from better documentation to a brand new feature. To get started take a look at our [Contribution Guidelines](CONTRIBUTING.md). ### Community Join our [Slack channel](https://join-c4.herokuapp.com/) to ask for help, show off your app, suggest change, or just chat.

近期下载者

相关文件


收藏者