All Projects â†’ kbelter â†’ Bubblepictures

kbelter / Bubblepictures

Licence: mit
Bubble Pictures for iOS done in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Bubblepictures

Linkedin scraper
A library that scrapes Linkedin for user data
Stars: ✭ 413 (-4.84%)
Mutual labels:  profile, users
Insgallery
📾 Instagram-like image picker for Android (äž€æŹŸ UI ç‚«é…·é«˜ä»ż Instagram çš„ć›Ÿç‰‡ă€è§†éą‘é€‰æ‹©ć™š)
Stars: ✭ 409 (-5.76%)
Mutual labels:  photos, picture
bubble-layout
An Android ViewGroup that displays avatar bubbles... similar to the chat bubbles on Facebook Messenger.
Stars: ✭ 46 (-89.4%)
Mutual labels:  circle, bubble
hes-gallery
Light, dependency free, responsive gallery script
Stars: ✭ 27 (-93.78%)
Mutual labels:  photos, images
Android Camera2 Secret Picture Taker
Take pictures đŸ“· secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (-36.64%)
Mutual labels:  photos, picture
ImageOnMap
Repo for ImageOnMap, a bukkit plugin created to display any image using a map
Stars: ✭ 162 (-62.67%)
Mutual labels:  picture, images
awesome-asian-girls
A curated list of websites with photosets of Asian girls.
Stars: ✭ 29 (-93.32%)
Mutual labels:  photos, picture
Unsplash rb
💎 Ruby wrapper for the Unsplash API.
Stars: ✭ 202 (-53.46%)
Mutual labels:  images, photos
Cirque
An iOS component that enables you to draw multi color circle strokes with gradient trasitions between colors
Stars: ✭ 23 (-94.7%)
Mutual labels:  circle, circular
Rocket-Notes
The World's Fastest Note Taking App. Fast. Simple. Create a note in one tap! Create image and text notes directly from your home screen!
Stars: ✭ 20 (-95.39%)
Mutual labels:  photos, picture
wp-github-gos
ćˆ©ç”š github api 漞现的侀äžȘć­˜ć‚šć›Ÿç‰‡/附件的 wordpress 插件
Stars: ✭ 42 (-90.32%)
Mutual labels:  picture, images
Unsplash Php
đŸ‘» Official PHP wrapper for the Unsplash API
Stars: ✭ 332 (-23.5%)
Mutual labels:  images, photos
ImageUI
A photo browser inspired by Apple Photos app
Stars: ✭ 44 (-89.86%)
Mutual labels:  photos, images
Hoverzoom
Google Chrome extension for zooming images on mouse hover
Stars: ✭ 426 (-1.84%)
Mutual labels:  images, photos
Opensource Socialnetwork
Open Source Social Network (OSSN) is a social networking software written in PHP. It allows you to make a social networking website and helps your members build social relationships, with people who share similar professional or personal interests. It is available in 16 international languages.
Stars: ✭ 710 (+63.59%)
Mutual labels:  profile, photos
ACBRadialCollectionView
An extension on UICollectionView which automatically transforms collection view cells to a radial path
Stars: ✭ 31 (-92.86%)
Mutual labels:  collectionview, circular
Imgpush
Minimalist Self-hosted Image Service for user submitted images in your app
Stars: ✭ 144 (-66.82%)
Mutual labels:  images, picture
Exiftool Vendored.js
Fast, cross-platform Node.js access to ExifTool
Stars: ✭ 200 (-53.92%)
Mutual labels:  images, photos
rn-circular-slider
React Native circular slider based on react-native-svg
Stars: ✭ 25 (-94.24%)
Mutual labels:  circle, circular
Magicalcamera
A library to take picture easy, transform your data in different format and save photos in your device
Stars: ✭ 327 (-24.65%)
Mutual labels:  photos, picture

Bubble Pictures

Bubble Pictures

Bubble Pictures

(Pictures from Luv.it App using Bubble Pictures)

*Creator Kevin Belter.

Version License Platform

About

This library is for showing pictures in a nice way, maybe if you want to show users that upvoted a post or something like that, in that case BubblePictures is the way to go. BubblePictures supports all Screen sizes and orientations. And it's super easy to use. Feel free to download the example and play with different sizes :P If you have questions about it, please contact me at my email. Made with love and caffeine :).

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 9.0 or above

Installation

BubblePictures is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BubblePictures'

Usage

To use it just add a CollectionView with your desired size.

Then you must create an BPCellConfigFile for each bubble picture that you want to show. The BPCellConfigFile initializer has 2 values:

  • imageType: (This is an Enum that support 3 different values, [UIImage, URL or UIColor])
  • title: This is an String for the title in front of the bubble picture.

After having your array of BPCellConfigFile you must have as well a reference to the bubblePicture instance so you can have it like this in your ViewController for example:

private var bubblePictures: BubblePictures!

Finally in your ViewDidLoad you can initialize the bubblePictures like this:

bubblePictures = BubblePictures(collectionView: {{YOUR_COLLECTION_VIEW}}, configFiles: {{YOUR_BPCellConfigFiles_ARRAY}})

That's it, now you should see the bubbles rendering perfectly.

Delegate

If you want to know when an user tap on a bubble you must adopt the protocol BPDelegate. It has 2 methods for that pourpose:

  • func didSelectTruncatedBubble()
  • func didSelectBubble(at index: Int)

With those methods you can achieve what ever you need when the user taps the bubbles.

Don't forget to mark in your bubblePictures instance that you are now the delegate by doing this:

bubblePictures.delegate = self

Layout Configuration

If you want to config the layout, you must inject in the initializer the layoutConfigurator.

The layoutConfigurator is an struct that has these values:

  • backgroundColorForTruncatedBubble: This color is for the background color in case that the bubbles are being truncated because of the space in the screen.
  • fontForBubbleTitles: If you want to use another font you can pass it here for the bubble titles.
  • colorForBubbleBorders: If you have for example a black background below the collectionView you should pass UIColor.black for achieving a good layout.
  • colorForBubbleTitles: This is the color of the bubble titles.
  • maxCharactersForBubbleTitles: This is the max lenght of characters for every bubble title.
  • maxNumberOfBubbles: You can add this property if you want to hardcode the number of bubbles that will be shown. (If the number is larger than the whole screen, then it will show the maximum number of bubbles that fits the screen)
  • displayForTruncatedCell: If you don't want BubblePictures to calculate the number in the truncated cell, then you can assign one yourself.
  • widthForBubbleBorders: The border width for the bubbles.
  • bubbleImageContentMode: The content mode for the image in the bubbles.
  • distanceInterBubbles: The distance between each bubble, the default value is the size of the bubble divided by 3.
  • alignment: The alignment of the bubbles, if you want them right or left.

So you can create a layoutConfigurator like this:

let layoutConfigurator = BPLayoutConfigurator( backgroundColorForTruncatedBubble: UIColor.hex("D75A4A"), fontForBubbleTitles: UIFont(name: "HelveticaNeue-Light", size: 17.0)!, colorForBubbleBorders: UIColor.white, colorForBubbleTitles: UIColor.white, maxCharactersForBubbleTitles: 3)

and then inject it in the initializer:

bubblePictures = BubblePictures(collectionView: {{YOUR_COLLECTION_VIEW}}, configFiles: {{YOUR_BPCellConfigFiles_ARRAY}}, layoutConfigurator: layoutConfigurator)

Updates History

Version 2.1.3

  • Changed the property in the Layout Configurator called 'numberForTruncatedCell' to 'displayForTruncatedCell'. This property now is an Enum that supports:
    • Number (The only previous available value)
    • Text
    • Image Type (URL, Image or Color)

Thanks to Valgrin for creating a PR and adding this feature :)

Author

Kevin Belter, [email protected]

*Images on the header made by Carlos Nicolas Kans

License

BubblePictures 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].