All Projects → Yusef-Naser → Leon

Yusef-Naser / Leon

Licence: MIT license
Leon is swift library to show and slid images with more gesture

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Leon

StackViewLayout
Coming soon!
Stars: ✭ 26 (+62.5%)
Mutual labels:  swift-framework, ios-ui
Lovefreshpeakapp oc
IOS电商购物APP: 爱鲜蜂OC版,规范的代码风格,使用Masonry布局适配所有ios机型 Shopping e-commerce projects, using automatic layout, suitable for any Ios model Website ;
Stars: ✭ 152 (+850%)
Mutual labels:  ios-app, ios-ui
Swiftcocoadsl
An easy way to write iOS UI
Stars: ✭ 103 (+543.75%)
Mutual labels:  ios-app, ios-ui
Iosproject
iOS project of collected some demos for iOS App, use Objective-C
Stars: ✭ 5,357 (+33381.25%)
Mutual labels:  ios-app, ios-ui
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+343.75%)
Mutual labels:  swift-framework, ios-ui
Cocoaasyncsocket demo
基于AsyncSocket搭建即时通讯体系 . 包含TCP连接 , 消息发送 , 消息接收 , 心跳处理 ,断网重连 , 消息超时 , 消息分发 , 数据库结构设计 , 消息丢失等 . 以及UI设计, 文本表情消息/语音消息/图片消息/视频消息/文件消息/撤回消息/提示语消息的实现思路讲解
Stars: ✭ 981 (+6031.25%)
Mutual labels:  ios-app, ios-ui
Bookstore Ios
 Sample iOS App - A collection of examples and patterns for Unit Testing, UI Testing, handling Result/Optionals, writing documentation, and more. Details in README.
Stars: ✭ 147 (+818.75%)
Mutual labels:  ios-app, swift-framework
Iosproject
IOS综合项目,完善的框架,路由模块化设计,集成科大讯飞SDK方便iOS基本输入控件实现语音辅助输入,UI效果参照京东APP,JS与OC交互,ionic跨平台开发,MQTT 协议,即时通讯协议,视屏播放,跑马灯效果 仿美团地图定位,城市收索, 友盟分享,基础动画 增加FCUIID帮助类,引导页功能模块,照片上传 ,UIView自定义导航栏,文件下载,Masonry 案例,fmdb,数据库,sqlite,百度地图,二维码,照片上传,照片上传有进度,列表倒计时,H5和原生交互,自定义各种弹框,常见表单类型,人脸识别,列表加载图片,列表拖拽,日历操作,导航条渐变,核心动画,动画特效等等
Stars: ✭ 291 (+1718.75%)
Mutual labels:  ios-app, ios-ui
Gestureviews
ImageView and FrameLayout with gestures control and position animation
Stars: ✭ 2,257 (+14006.25%)
Mutual labels:  imageview, gesture
Ioniconskit
Use Ionicons in your Swift projects.
Stars: ✭ 310 (+1837.5%)
Mutual labels:  uiimage, ios-ui
Example Ios Apps
 A curated list of Open Source example iOS apps developed in Swift. An amazing list for people who are beginners and learning ios development and for ios developers who need any example app or feature.
Stars: ✭ 461 (+2781.25%)
Mutual labels:  ios-app, ios-ui
CustomKeyboard
A simple and fast implementation of a custom numeric keypad. There is always a keyboard for you.
Stars: ✭ 20 (+25%)
Mutual labels:  ios-app, ios-ui
Ios Tagent
iOS support agent for automation
Stars: ✭ 400 (+2400%)
Mutual labels:  ios-app, ios-ui
Slidingtabbar
A custom TabBar view with sliding animation written in Swift.
Stars: ✭ 84 (+425%)
Mutual labels:  ios-app, ios-ui
Autoinch
优雅的iPhone全尺寸/等比例精准适配工具
Stars: ✭ 395 (+2368.75%)
Mutual labels:  ios-app, ios-ui
Swiftui Tutorials
A code example and translation project of SwiftUI. / 一个 SwiftUI 的示例、翻译的教程项目。
Stars: ✭ 1,992 (+12350%)
Mutual labels:  ios-app, ios-ui
InstaSmart
A Flutter app to plan and beautify your Instagram feed
Stars: ✭ 18 (+12.5%)
Mutual labels:  ios-app, frame
RDPopup
A simple way to add custom Popup. Design on Nib and use as you want. Written in Objective-C.
Stars: ✭ 19 (+18.75%)
Mutual labels:  ios-app, ios-ui
Mycoretextlabel
图文混排 , 实现图片文字混排 , 可显示常规链接比如网址,@,#话题#,手机号 , 邮箱号等 , 可以自定义链接字,设置关键字高亮等功能 . 适用于微博,微信,IM聊天对话等场景 . 实现这些功能仅用了几百行代码,耦合性也较低
Stars: ✭ 192 (+1100%)
Mutual labels:  ios-app, ios-ui
Sequents
A simple continuous animation library for iOS UI.
Stars: ✭ 31 (+93.75%)
Mutual labels:  swift-framework, ios-ui

Leon

leon is a ios library written with swift to enable developer to handle show images with animation and with more gesture

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Leon into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Leon', '~> 0.0.8'

Usage

How to get image frame

if container of image is UIView or UIStackView

// get point of image
let point = imageView.convert(imageView.bounds.origin, to: self.view /* view is parent view in viewController */ )
// get size of image
let size = CGSize(width: imageView.frame.width , height: imageView.frame.height)
// get frame of image 
let frame = CGRect(origin: point , size: size )

There are 6 init funtions in Leon Images

First init

// 1- first init
let vc = LeonImages(image: imageView.image!)
self.present(vc , animated: true )
  • image: just pass image in imegView without starter animation
  • use this init if u have image as just UIImage and don't need to load image from web







Second init

//2- second init
let vc = LeonImages(imageURL: String )
self.present(vc , animated: true )
  • imageURL: is a string url of image to load from web without starter animation
  • use this init if you don't want start animation




Third init

// 3- third init
let vc = LeonImages(listImagesURL: [Any] , index : 2 )
self.present(vc , animated: true )
  • listImagesURL : an array that contain two type of images
    • array may contain string url image to load from web
    • array may contain UIImage to just set this image in imageView in LeonImages
  • index ( optional -> default value = 0 ) : the index for starter image in array




Fourth init

// 4- fourth init
let vc = LeonImages(startFrame: imageView.frame , thumbnail: imageView.image! , imageURL: String )
self.present(vc , animated: true )
  • Use this init to start Leon with animation from start fram to center of screen
  • startFrame : init frame of image to start frame from this point
  • thumbnail : init UIImage in imageView untile animation finished
  • imageURL : start load image after animation finish




Fifth init

// 5- fifth init
let vc = LeonImages(startFrame: imageView.frame , thumbnail: imageView.image! )
self.present(vc , animated: true )
  • Use this init to start Leon with animation from start fram to center of screen
  • startFrame : init frame of image to start frame from this point
  • thumbnail : init UIImage in imageView untile animation finished




Sixth init

// 6- Six init
let vc = LeonImages(startFrame: imageView.frame , thumbnail: imageView.image!, listImagesURL: [Any] , index : 2 )
self.present(vc , animated: true )
  • startFrame : init frame of image to start frame from this point
  • thumbnail : init UIImage in imageView untile animation finished
  • listImagesURL : an array that contain two type of images
  • array may contain string url image to load from web
  • array may contain UIImage to just set this image in imageView in LeonImages
  • index ( optional -> default value = 0 ) : the index for starter image in array




Features

  • change error message when loading failure (default value : "Error loading, tap to reload" )
let vc = // use init LeonImages
vc.errorMessage = "write your message"
  • enable / disable tap to reload when loadin failure
let vc = // use init LeonImages
vc.tapToReload = true

  • enable / disable close button (default value : true)
let vc = // use init LeonImages
vc.showCloseButton = false
  • dismiss image by panGesture

  • zoom image with pinch gesture

  • zoom image with double tap

  • create custom View Controller extended LeonImages

    Example of CustomLeonImages

    Custom Leon Images

Author

Yusef Naser

License

Leon is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].