{"id":21903867,"url":"https://github.com/hansemannn/titanium-material","last_synced_at":"2025-04-15T20:44:06.353Z","repository":{"id":142791353,"uuid":"129891079","full_name":"hansemannn/titanium-material","owner":"hansemannn","description":"Use the native Material UI/UX framework (https://github.com/CosmicMind/Material) in Titanium!","archived":false,"fork":false,"pushed_at":"2018-04-25T12:12:04.000Z","size":5403,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T01:12:01.667Z","etag":null,"topics":["appcelerator","javascript","material-design","native","titanium"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansemannn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-17T11:00:09.000Z","updated_at":"2024-03-04T03:00:07.000Z","dependencies_parsed_at":"2023-03-18T06:00:49.667Z","dependency_job_id":null,"html_url":"https://github.com/hansemannn/titanium-material","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-material","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-material/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-material/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-material/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansemannn","download_url":"https://codeload.github.com/hansemannn/titanium-material/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249151949,"owners_count":21221155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appcelerator","javascript","material-design","native","titanium"],"created_at":"2024-11-28T15:29:51.568Z","updated_at":"2025-04-15T20:44:06.346Z","avatar_url":"https://github.com/hansemannn.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS Material Library in Titanium\n\nUse the native [Material UI/UX framework](https://github.com/CosmicMind/Material) in Titanium!\n\n\u003e This module project contains pure Swift libraries. A proof of concept includes an example of using the `RaisedButton` API.\nFor more API's, submit a pull request to expose components like `BottomNavigationView`, `Snackbar` or `MotionAnimation`.\n\n## Requirements\n\n- [x] Swift 4.1+ (embedded into the hook in `hooks/`), iOS 8+\n- [x] Titanium SDK 6.3.0+ (7.1.0+ recommended)\n\n\n## API'S\n\n### Root-Module\n\n#### Methods\n\n##### `createRaisedButton(args)`\n\nCreates a new raised button.\n\n##### `createTextField(args)`\n\nCreates a new text field.\n\n##### `createCardView(args)`\n\nCreates a new card view.\n\n---\n\n### `RaisedButton` (extends `Ti.UI.View`)\n\n\u003cimg src=\".github/raised-button.gif\" height=\"80\" /\u003e\n\n#### Additional Properties\n\n- `title` (`String`)\n- `color` (`String`)\n- `selectedColor` (`String`)\n- `pulseColor` (`String`)\n- `image` (`String`)\n\n---\n\n### `CardView` (extends `Ti.UI.View`)\n\n#### Additional Properties\n\n- `contentView` (`Ti.UI.View`)\n- `contentViewInsets` (`Dictionary`)\n- `backgroundColor` (`String`)\n- `cornerRadius` (`Number`)\n\n---\n\n### `TextField` (extends `Ti.UI.View`)\n\n\u003cimg src=\".github/text-field.gif\" height=\"100\" /\u003e\n\n#### Additional Properties\n\n- `value` (`String`)\n- `hintText` (`String`)\n- `hintTextColor` (`String`)\n- `font` (`Dictionary`)\n\n#### Events\n\n- `change`\n- `focus`\n- `blur`\n\n## Compile native libraries\n\n### iOS\n\nThis project uses the following two Swift dependencies:\n\n- Material\n- Motion\n\nThis projects resolves all dependencies already for you, including setting the Swift version using the hook placed in `hooks/`.\n\nRight now, Titanium only supports CocoaPods for Hyperloop, so in order to use it for classic modules, you need\nto create universal \"fat\" frameworks and strip the unused architectures again (this is taken care of by the SDK already).\nA universal library can be created by grabbing the frameworks from `Debug-iphonesimulator` (Simulator architectures) \nand `Debug-iphoneos` (Device architectures) and combine them using the following commands:\n\n0. Install CocoaPods (`sudo gem install cocoapods`) and run `pod install` in the `native/` directory of this repository\n1. Create the following folder structures: `sim/`, `device/` \u0026 `universal/`\n2. Copy the .framework files from `Debug-iphonesimulator` to `sim/`\n3. Copy the .framework files from `Debug-iphoneos` to `device/`\n4. Copy the .framework files from `device` to `universal/` (they are the base for universal frameworks)\n5. Copy the `Modules/*.swiftmodule` to the universal directory of the framework\n6. Use the following command to merge the sim- and device-frameworks together:\n```bash\nlipo -create -output universal/\u003cname\u003e.framework/\u003cname\u003e sim/\u003cname\u003e.framework/\u003cname\u003e device/\u003cname\u003e.framework/\u003cname\u003e\n```\n7. Replace the final frameworks in `\u003cmodule-project\u003e/platform`\n8. Make a pull request to this repo, so others can benefit from it as well\n\nThese steps are based on a [Shell Script](https://gist.github.com/cromandini/1a9c4aeab27ca84f5d79) used natively.\n\nNote: In the future, this will all be done by CocoaPods. Make sure to follow [TIMOB-25927](https://jira.appcelerator.org/browse/TIMOB-25927) regarding Swift support in the SDK.\n\n## Example\n\n```js\nvar Material = require('ti.material');\n\nvar win = Ti.UI.createWindow({\n  backgroundColor: '#fff'\n});\n\nvar btn = Material.createRaisedButton({\n  width: 300,\n  height: 40,\n  title: 'Titanium rocks!'\n});\n\nbtn.addEventListener('click', function() {\n  alert('YEY!');\n});\n\nwin.add(btn);\nwin.open();\n\n```\n\n## Author\n\nHans Knöchel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](http://hans-knoechel.de))\n\n## License\n\nMIT\n\n## Contributing\n\nCode contributions are greatly appreciated, please submit a new [Pull-Request](https://github.com/hansemannn/titanium-material/pull/new/master)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-material","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansemannn%2Ftitanium-material","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-material/lists"}