Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
xu.shuifeng authored and xu.shuifeng committed Jun 15, 2018
1 parent 66c1a4c commit 1b2e11a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Binary file added Assets/MetalFiltersAppLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions MetalFilters/Views/FilterControlView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ class FilterControlView: UIView {
var value: Float = 0

private let cancelButton: UIButton

private let doneButton: UIButton

private let titleLabel: UILabel

private let borderButton: UIButton
private let sliderView: HorizontalSliderView

private let filterTool: FilterToolItem
Expand Down Expand Up @@ -56,6 +54,11 @@ class FilterControlView: UIView {

sliderView = HorizontalSliderView(frame: CGRect(x: 30, y: frame.height/2 - 50, width: frame.width - 60, height: 70))

borderButton = UIButton(type: .system)
borderButton.frame.size = CGSize(width: 22, height: 22)
borderButton.setImage(UIImage(named: "filter-border"), for: .normal)
borderButton.setImage(UIImage(named: "filter-border-active"), for: .selected)

super.init(frame: frame)

if filterTool.type == .color {
Expand Down Expand Up @@ -98,6 +101,12 @@ class FilterControlView: UIView {
sliderView.slider.addTarget(self, action: #selector(sliderValueChanged(_:)), for: .valueChanged)
}

override func layoutSubviews() {
super.layoutSubviews()

// if filterTool.type == .
}

@objc private func cancelButtonTapped() {
delegate?.filterControlViewDidPressCancel()
}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
![App Logo](Assets/MetalFiltersAppLogo.png)

Just a demo using [MetalPetal](https://github.com/MetalPetal/MetalPetal) to implement Instagram filters.

## Features

* Instagram like photo picker
* All Instagram filters
* Slider to control Strength of filters

## Requirements

Expand Down

0 comments on commit 1b2e11a

Please sign in to comment.