Giter VIP home page Giter VIP logo

urlpreviewpod's Introduction

URLPreviewPod

Platform Version License

Layouts

  • Default

  • Change Color

  • No og:title but have title

  • No response or tag (og:)

Installation

Use CocoaPods :

使用cocoapods安裝,加入指令到專案的Podfile:

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

pod "URLPreviewPod"

Add With Framework :

下載專案複製Framework進入你的專案

Download Project and copy Framework in your Project


安裝 :

1.Linked Framworks and Libraries -> 新增本Framework、libxml2.(dylib/tbd)

2.Build Settings -> Header Search Paths -> 新增 /usr/include/libxml2

3.Build Phases -> Copy Boundle Resources -> 新增本Framework

Install :

1.Linked Framworks and Libraries -> Add this Framework and libxml2.(dylib/tbd)

2.Build Settings -> Header Search Paths -> Add /usr/include/libxml2

3.Build Phases -> Copy Boundle Resources -> Add this Framework


使用 :

1.請先用initWithFrame初始化物件(最低尺寸 -> 寬:>=300,高:>=100)

2.如果需要點擊後導到該網站,請設定delegate,並實作URLPreviewDelegate的方法

3.使用saveTemporaryImage判斷是否暫存圖片

4.用showURLPreviewWithURL放入您的網址

Use :

1.First use initWithFrame init you'r object(Minimum size -> Width:>=300,Height:>=100)

2.If you need to push to you'r URL, set URLPreviewDelegate

3.Use saveTemporaryImage to save Image

4.Use function showURLPreviewWithURL to set you'r URL

Code

#import <URLPreview/Preview.h>

Preview *preview = [[Preview alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 100)];
preview.center = self.view.center;
preview.delegate = self;
[preview showURLPreviewWithURL:@"https://github.com/StewartXIII/URLPreview"];

Change Color

preview.titleColorHexString = @"#fe5b18";
preview.descriptionColorHexString = @"#7c6262";
preview.siteNameColorHexString = @"#2918df";
preview.longPressColorHexString = @"#f38181";

Use 3D Touch

[preview use3DTouchOnController:self];

Special Thanks

Author

Stewart, [email protected]

License

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

urlpreviewpod's People

Contributors

stewartxiii avatar

Watchers

James Cloos avatar Carabineiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.