Latest 1.05
Homepage https://github.com/spiderzys/TumblrImageViewController
License Apache License, Version 2.0 Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Platforms ios 10.0
Authors

It shows the images of tumblr blogs in the controller.

To import it, just

        pod 'TumblrImageViewController' 

in pod file.

The implementation of the following protocal is necessary

@protocol TumblrImageViewControllerDelegate <NSObject>  // the delegate should know what to do after request and apikey

@required

- (void)tumblrImagePickerController:(__kindof UIViewController *)picker didFinishPickingImage:(UIImage *)image;
- (NSString*)apikey;

@optional

- (void)didRequestFailedDueToErrorMessage:(NSString*)errorMessage;

@end

To get the apikey (OAuth Consumer Key), you can go to https://www.tumblr.com/docs/en/api/v2 to register your application

You can specify the number of images for each row by setting numOfColumns.
You can also specify the image cell size by setting imageCellSize. However, setting this will disable the function of numOfColumns.

Below is an example:

TumblrImageViewController *tumblrImageViewController = [[TumblrImageViewController alloc]init];

tumblrImageViewController.numOfColumns = 5;

tumblrImageViewController.delegate = self;

[self presentViewController:tumblrImageViewController animated:YES completion:^{

}];

- (NSString*)apikey{
   return @"put your key";
 }

 - (void)tumblrImagePickerController:(__kindof UIViewController *)picker didFinishPickingImage:(UIImage *)image{

[picker dismissViewControllerAnimated:YES completion:^{

    self.view.backgroundColor = [UIColor colorWithPatternImage:image];
}];

 }

Latest podspec

{
    "name": "TumblrImageViewController",
    "version": "1.05",
    "summary": "A view controller showing images from tumblr blog",
    "description": "This is a view controller showing the images from tumblr blog. It integrates a search bar for the input of the blog name. You need an apikey of tumblr (OAuth Consumer Key) to use it. You also need to implement protocal of the TumblrViewController",
    "homepage": "https://github.com/spiderzys/TumblrImageViewController",
    "license": {
        "type": "Apache License, Version 2.0",
        "text": "Licensed under the Apache License, Version 2.0 (the "License");nyou may not use this file except in compliance with the License.nYou may obtain a copy of the License atnnhttp://www.apache.org/licenses/LICENSE-2.0nnUnless required by applicable law or agreed to in writing, softwarendistributed under the License is distributed on an "AS IS" BASIS,nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.nSee the License for the specific language governing permissions andnlimitations under the License.n"
    },
    "authors": {
        "spiderzys": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/spiderzys/TumblrImageViewController.git",
        "tag": "1.05"
    },
    "source_files": [
        "TumblrImageViewController",
        "TumblrImageViewController/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "resources": "TumblrImageViewController/**/*.xib"
}

Pin It on Pinterest

Share This