LGButton | fully customisable subclass of the native UIControl | iOS library

 by   loregr Swift Version: 1.1.6 License: MIT

kandi X-RAY | LGButton Summary

kandi X-RAY | LGButton Summary

LGButton is a Swift library typically used in Mobile, iOS, Xcode, Uikit applications. LGButton has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              LGButton has a medium active ecosystem.
              It has 2145 star(s) with 134 fork(s). There are 37 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 62 have been closed. On average issues are closed in 84 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of LGButton is 1.1.6

            kandi-Quality Quality

              LGButton has 0 bugs and 0 code smells.

            kandi-Security Security

              LGButton has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              LGButton code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              LGButton is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              LGButton releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 842 lines of code, 2 functions and 2 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LGButton
            Get all kandi verified functions for this library.

            LGButton Key Features

            No Key Features are available at this moment for LGButton.

            LGButton Examples and Code Snippets

            No Code Snippets are available at this moment for LGButton.

            Community Discussions

            QUESTION

            How to show loading spinner of LGButton before executing function on click?
            Asked 2020-Nov-06 at 06:35

            I was using https://github.com/loregr/LGButton . I got the button to trigger a function etc but how do I use the loading spinner UI of this library? Once I enable it too, it only shows for a couple milliseconds since on button click the function is triggered fast

            ...

            ANSWER

            Answered 2020-Nov-06 at 06:35

            When you set isLoading parameter to true, it will show spinner.

            Source https://stackoverflow.com/questions/64708605

            QUESTION

            Why doesn't IQKeyboardManager scroll my UITableView to make my custom cell's textfield visible
            Asked 2020-Sep-21 at 16:31

            This is the result I currently get (unwanted): https://vimeo.com/459984986.

            This is the result I get using a workaround (almost what I want): https://vimeo.com/459986233.

            The summary of what my problem is, is the following: (1) I have installed the "IQKeyboardManagerSwift" cocoapod, (2) I have a custom cell in my UITableViewController that is a FolingCell (another cocoapod) and contains a textfield, (3) when I tap inside the textfield, I want the view to automatically scroll up to make the textfield visible (above the keyboard), which should be automatically taken care of by IQKeyboardManager (yes, I have added the "enable" code in my AppDelegate).

            As seen in the "unwanted" result video above, the view seemingly attempts to scroll but, ultimately, just ends up jittering up and down slightly before ending up at the original position while the keyboard slides up and covers the textfield undesirably.

            Further, the little "workaround" I found which I do not want to settle for is adding the following line to the textfield's IBAction editingDidEnd outlet/action function: "sender.becomeFirstResponder()". Before I updated to XCode 12 and iOS 14 on my iPhone on which I run and test my app, I did not have to hassle with ".becomeFirstResponder()" or ".resignResponder()" because that's what IQKeyboardManager does automatically. Now, adding the aforementioned line of code allows the UITableViewController to move the view above the keyboard. BUT, if you look closely, it sits the textfield right on top of the keyboard which is clearly not done by IQKeyboardManager because IQKeyboardManager has a default offset of CGFloat(10) between the textfield and keyboard.

            I think the relevant parts of code are my custom cell (called "SavedImageFoldingImageCell") because that is where I create the textfield in question and my UITableViewController (called "SavedImageTableViewController").

            Please, any help, suggestion, advice you can offer would help me a ton and be super appreciated. Thanks!

            Yes, my code looks horrific because I have no proper training/education in best practices for coding or coding in general. Suggestions there would be appreciated as well! If you see ways I can shorten and organize my code, by all means divulge your secrets!

            Custom Cell's Code:

            ...

            ANSWER

            Answered 2020-Sep-21 at 16:31

            I solved my own problem by simply switching the class from UITableViewController -> UIViewController. I went through the closed issues on IQKeyboardManager's Github page and discovered that since Apple's UITableViewController automatically handles movement of the view and keyboard, IQKeyboardManager's developer chose to ignore textfield's that are in a UITableViewController. Therefore, you must change the class to a UIViewController or another supported class to have textfields recognized by IQKeyboardManager.

            Source https://stackoverflow.com/questions/63984670

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install LGButton

            To integrate LGButton into your Xcode project using CocoaPods, specify it in your Podfile:.

            Support

            Whether a touch feedback should be visible or not. The first color of the gradient background. The second color of the gradient background. The second color of the gradient background. Whether the gradient should be horizontal or not. Set the gradient rotation angle (degrees from -360 to 360). Apply a corner radius equals to height/2. The title font name. The title font size. If true the left icon will be placed on the top and the right icon will be placed on the bottom. The name of the left icon (taken from the cheat sheet). Left Icon Font Name. The name of the left icon font name (taken from the table above). Left Icon Font Size. The left icon font size. The left icon color. The name of the left source asset. The left image height. The left image width. The left image tint color. The name of the right icon (taken from the cheat sheet). Right Icon Font Name. The name of the right icon font name (taken from the table above). Right Icon Font Size. The right icon font size. The right icon color. The name of the right source asset. The right image height. The right image width. The right image tint color. The spacing between the title and the image/icon. The internal top spacing. The internal bottom spacing. The internal leading spacing. The internal trailing spacing. The loading spinner color. The loading message text. The loading message font name. The loading message font size. true if the button items should be aligned to the left. It requires the button to have a fixed width. true if the button items should be aligned to the right. It requires the button to have a fixed width. You can download the demo project if you want to check more.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/loregr/LGButton.git

          • CLI

            gh repo clone loregr/LGButton

          • sshUrl

            git@github.com:loregr/LGButton.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link