Latest 1.0.1
Homepage https://github.com/Backelite/BkVASPhoneView
License MIT
Platforms ios 7.0, requires ARC
Authors

=========
License MIT
Release
CocoaPods Compatible

Custom view for phone number display, following the SVA+ requirements. Written in Objective-C.

Image

XIB

BkVASPhoneView is IBDesignable/IBInspectable compliant. Simply drag and drop a UIView on your storyboard/XIB, change the class to "BkVASPhoneView" and you can customize the phone number, type/color and fee display.

IB-Usage

BkVASPhoneView works great with Auto-Layout : juste like a regular UILabel, by not setting a specific width and height, its size will not exceed the size it requires.

Please note that IBDesignable feature is not available through a Carthage installation. Please see #335 for more information.

Programmatically

To instantiate a BkVASPhoneView :

Objective-C :

BkVASPhoneView *phoneView = [[BkVASPhoneView alloc] initWithPhoneNumber:@"0 825 123 456" feeType:BkVASFeeTypePremium fee:@"0,34€/min" size:BkVASPhoneSizeSmall];
[self.view addSubview:phoneView];

Swift :

let phoneView = VASPhoneView(phoneNumber: "0 802 12 12", feeType: .premium, fee: "0,34€/min", size: .small)
self.view.addSubview(phoneView)

To re-use an instance of BkVASPhoneView and configure it with new informations :

Objective-C :

[phoneView configureWithPhoneNumber:@"0 825 123 456" feeType:BkVASFeeTypePremium fee:@"0,34€/min" size:BkVASPhoneSizeSmall];

Swift :

phoneView.configure(phoneNumber: "0 802 12 12", feeType: .premium, fee: "0,34€/min", size: .small)

Usage

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

Requirements

iOS 7

Installation

From CocoaPods

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

pod "BkVASPhoneView"

For Swift projects (includes Swift aliases for classes and enums) :

pod "BkVASPhoneView/Swift"

From Carthage

github "Backelite/BkVASPhoneView"

Run carthage update to build the framework and drag the built BkVASPhoneView.framework (along with BkVASPhoneViewSwift.framework for Swift projects) (in Carthage/Build/iOS folder) into your Xcode project (Linked Frameworks and Libraries in Targets).

Authors

David Yang, [email protected]

License

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

Latest podspec

{
    "name": "BkVASPhoneView",
    "version": "1.0.1",
    "summary": "Custom view for phone number display, following the SVA+ requirements. Written in Objective-C.",
    "description": "This is a custom view for phone number display, following the SVA+ requirements.nhttp://www.svaplus.fr/actualites-et-travaux/la-charte-signaletique-des-numeros-sva-8493689-1049.html",
    "homepage": "https://github.com/Backelite/BkVASPhoneView",
    "license": "MIT",
    "authors": {
        "David Yang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Backelite/BkVASPhoneView.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "resource_bundles": {
        "BkVASPhoneView": [
            "assets/Exo-Bold.otf"
        ]
    },
    "default_subspecs": "ObjectiveC",
    "subspecs": [
        {
            "name": "ObjectiveC",
            "platforms": {
                "ios": "7.0"
            },
            "source_files": "BkVASPhoneView/**/*.{h,m}"
        },
        {
            "name": "Swift",
            "platforms": {
                "ios": "8.0"
            },
            "source_files": "BkVASPhoneViewSwift/**/*.swift",
            "dependencies": {
                "BkVASPhoneView/ObjectiveC": []
            }
        }
    ]
}

Pin It on Pinterest

Share This