surui

sdk init

Showing 75 changed files with 844 additions and 16 deletions
Pod::Spec.new do |s|
s.name = "HHDoctorSDK"
s.version = "1.1.2"
s.version = "1.1.3"
s.summary = "和缓视频医生SDK(融云)"
s.description = <<-DESC
... ...
//
// DACircularProgressView.h
// DACircularProgress
//
// Created by Daniel Amitay on 2/6/12.
// Copyright (c) 2012 Daniel Amitay. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DACircularProgressView : UIView
@property(nonatomic, strong) UIColor *trackTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *progressTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *innerTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger roundedCorners UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
@property(nonatomic) CGFloat thicknessRatio UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger clockwiseProgress UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
@property(nonatomic) CGFloat progress;
@property(nonatomic) CGFloat indeterminateDuration UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger indeterminate UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay withDuration:(CFTimeInterval)duration;
@end
... ...
//
// DALabeledCircularProgressView.h
// DACircularProgressExample
//
// Created by Josh Sklar on 4/8/14.
// Copyright (c) 2014 Shout Messenger. All rights reserved.
//
#import "DACircularProgressView.h"
/**
@class DALabeledCircularProgressView
@brief Subclass of DACircularProgressView that adds a UILabel.
*/
@interface DALabeledCircularProgressView : DACircularProgressView
/**
UILabel placed right on the DACircularProgressView.
*/
@property (strong, nonatomic) UILabel *progressLabel;
@end
... ...
... ... @@ -165,9 +165,10 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if __has_feature(modules)
@import Foundation;
@import CoreLocation;
@import ObjectiveC;
@import UIKit;
@import CoreGraphics;
@import QuartzCore;
@import ObjectiveC;
@import Photos;
#endif
... ... @@ -194,14 +195,200 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
@class UIImage;
@class NSCoder;
@class UITouch;
@class UIEvent;
/// A simple rating view that can set whole, half or floating point ratings.
SWIFT_CLASS("_TtC11HHDoctorSDK15FloatRatingView")
@interface FloatRatingView : UIView
/// Sets the empty image (e.g. a star outline)
@property (nonatomic, strong) UIImage * _Nullable emptyImage;
/// Sets the full image that is overlayed on top of the empty image.
/// Should be same size and shape as the empty image.
@property (nonatomic, strong) UIImage * _Nullable fullImage;
/// Minimum rating.
@property (nonatomic) NSInteger minRating;
/// Max rating value.
@property (nonatomic) NSInteger maxRating;
/// Minimum image size.
@property (nonatomic) CGSize minImageSize;
/// Set the current rating.
@property (nonatomic) float rating;
/// Sets whether or not the rating view can be changed by panning.
@property (nonatomic) BOOL editable;
/// Ratings change by 0.5. Takes priority over floatRatings property.
@property (nonatomic) BOOL halfRatings;
/// Ratings change by floating point values.
@property (nonatomic) BOOL floatRatings;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)layoutSubviews;
- (void)touchesBegan:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nullable)event;
- (void)touchesMoved:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nullable)event;
- (void)touchesEnded:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nullable)event;
@end
SWIFT_PROTOCOL("_TtP11HHDoctorSDK23FloatRatingViewDelegate_")
@protocol FloatRatingViewDelegate
/// Returns the rating value when touch events end
- (void)floatRatingView:(FloatRatingView * _Nonnull)ratingView didUpdate:(float)rating;
@optional
/// Returns the rating value as the user pans
- (void)floatRatingView:(FloatRatingView * _Nonnull)ratingView isUpdating:(float)rating;
@end
/// 呼叫类型
/// <ul>
/// <li>
/// child: 儿童
/// </li>
/// <li>
/// adult: 成人
/// </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, HHCallType) {
HHCallTypeChild = 600000,
HHCallTypeAdult = 600002,
};
SWIFT_CLASS("_TtC11HHDoctorSDK14HHEveluateView")
@interface HHEveluateView : UIView
- (void)awakeFromNib;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end
@class CAAnimation;
@interface HHEveluateView (SWIFT_EXTENSION(HHDoctorSDK)) <CAAnimationDelegate>
- (void)animationDidStop:(CAAnimation * _Nonnull)anim finished:(BOOL)flag;
@end
@interface HHEveluateView (SWIFT_EXTENSION(HHDoctorSDK)) <FloatRatingViewDelegate>
- (void)floatRatingView:(FloatRatingView * _Nonnull)ratingView didUpdate:(float)rating;
@end
/// 接通前的呼叫状态
/// <ul>
/// <li>
/// onStart: 呼叫开始
/// </li>
/// <li>
/// waitingDoctor: 等待空闲的医生
/// </li>
/// <li>
/// callFreeDoctor: 有医生空闲,开始呼叫
/// </li>
/// <li>
/// callConnect: 建立呼叫
/// </li>
/// <li>
/// didRing: 医生响铃,等待接受
/// </li>
/// </ul>
typedef SWIFT_ENUM(NSInteger, HHMCallingState) {
HHMCallingStateOnStart = 0,
HHMCallingStateWaitingDoctor = 1,
HHMCallingStateCallFreeDoctor = 2,
HHMCallingStateCallConnect = 3,
HHMCallingStateDidRing = 4,
};
typedef SWIFT_ENUM(NSInteger, HHMLoginCode) {
HHMLoginCodeOK = 0,
HHMLoginCodeNetError = -1,
};
@class HHSDKOptions;
@protocol HHMVideoDelegate;
SWIFT_CLASS("_TtC11HHDoctorSDK6HHMSDK")
@interface HHMSDK : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=default) HHMSDK * _Nonnull default_;)
+ (HHMSDK * _Nonnull)default SWIFT_WARN_UNUSED_RESULT;
/// 初始化 SDK
/// \param option 可选的 SDK 配置
///
- (void)startWithOption:(HHSDKOptions * _Nullable)option;
/// 登录账号
/// \param uuid 用户的 唯一标志符
///
/// \param completion 完成回调
///
- (void)loginWithUuid:(NSInteger)uuid completion:(void (^ _Nonnull)(NSError * _Nullable))completion;
/// 自动登录(如果已经保存了用户帐号和令牌,建议使用这个登录方式)
/// \param uuid 自动登录参数
///
- (void)autoLoginWithUuid:(NSInteger)uuid;
/// 登出
- (void)logout;
/// 主叫发起通话
/// \param type 呼叫类型
///
- (void)startCall:(enum HHCallType)type;
/// 更新APNS Token
/// \param token APNS Token
///
- (void)updateAPNSWithToken:(NSData * _Nonnull)token;
/// 获取当前 SDK 版本号
@property (nonatomic, readonly, copy) NSString * _Nonnull SDKVersion;
/// 是否登录成功
@property (nonatomic, readonly) BOOL isLogined;
/// 添加视频监听
/// \param delegate 代理
///
- (void)addWithDelegate:(id <HHMVideoDelegate> _Nonnull)delegate;
- (void)removeWithDelegate:(id <HHMVideoDelegate> _Nonnull)delegate;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
enum PermissionType : NSInteger;
/// 视频管理器代理
SWIFT_PROTOCOL("_TtP11HHDoctorSDK16HHMVideoDelegate_")
@protocol HHMVideoDelegate <NSObject>
/// 主动视频时的呼叫状态变化
/// \param state 当前呼叫状态
///
- (void)callStateChange:(enum HHMCallingState)state;
/// 通话已接通
- (void)callDidEstablish;
/// 呼叫失败
/// \param error 错误信息
///
- (void)onFailWithError:(NSError * _Nonnull)error;
- (void)onCancel;
/// 通话已结束 (接通之后才有结束)
- (void)callDidFinish;
/// 转呼医生
- (void)onExtensionDoctor;
/// 接收到呼叫(被呼叫方)
/// \param callID 呼叫的 id
///
/// \param from 呼叫人 id
///
- (void)onReceive:(NSString * _Nonnull)callID from:(NSString * _Nonnull)from;
/// 收到视频呼入时的操作(被呼叫方)
/// \param accept 接受或者拒接
///
- (void)onResponse:(BOOL)accept;
/// 缺少必要权限
/// \param type 缺少的权限类型
///
- (void)onLeakPermission:(enum PermissionType)type;
@end
SWIFT_CLASS("_TtC11HHDoctorSDK23HHMediaStatusCheckUtils")
@interface HHMediaStatusCheckUtils : NSObject
... ... @@ -215,7 +402,6 @@ SWIFT_CLASS("_TtC11HHDoctorSDK13HHNetObserver")
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
@end
@class NSCoder;
@class UIWindow;
@class UICollectionView;
@class UICollectionViewCell;
... ... @@ -271,6 +457,22 @@ SWIFT_CLASS("_TtC11HHDoctorSDK23HHPhotoPickerController")
/// 全局配置
SWIFT_CLASS("_TtC11HHDoctorSDK12HHSDKOptions")
@interface HHSDKOptions : NSObject
/// hud 自动显示的时间
@property (nonatomic) NSTimeInterval hudDisTime;
/// 调试模式(打印日志)
@property (nonatomic) BOOL isDebug;
/// 是否开启测试服
@property (nonatomic) BOOL isDevelopment;
@property (nonatomic, copy) NSString * _Nonnull productId;
/// 推送证书名
@property (nonatomic, copy) NSString * _Nullable cerName;
/// 呼叫进入是否需要等待(呼入present 控制器前处理其他逻辑,3秒后自动失效)
@property (nonatomic) BOOL shouldWaingCall;
/// 是否开启美颜
@property (nonatomic) BOOL allowBeauty;
/// 允许视频完成后评价
@property (nonatomic) BOOL allowEvaluate;
- (nonnull instancetype)initWithProductId:(NSString * _Nonnull)productId isDebug:(BOOL)isDebug isDevelop:(BOOL)isDevelop OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
@end
... ... @@ -287,6 +489,16 @@ SWIFT_CLASS("_TtC11HHDoctorSDK12HHSDKOptions")
typedef SWIFT_ENUM(NSInteger, PermissionType) {
PermissionTypeLocationAlways = 0,
PermissionTypeLocationWhenInUse = 1,
PermissionTypeMicrophone = 2,
PermissionTypeCamera = 3,
PermissionTypePhotos = 4,
};
... ... @@ -329,6 +541,8 @@ SWIFT_CLASS("_TtC11HHDoctorSDK12HHSDKOptions")
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
... ...
... ... @@ -46,18 +46,16 @@
#import "ijksdl_ios.h"
#import "ijksdl_vout_overlay_videotoolbox.h"
#import "NTESGLView.h"
#import "CGGeometry+RSKImageCropper.h"
#import "RSKImageCropper.h"
#import "RSKImageCropViewController+Protected.h"
#import "RSKImageCropViewController.h"
#import "RSKImageScrollView.h"
#import "RSKTouchView.h"
#import "UIApplication+RSKImageCropper.h"
#import "UIImage+RSKImageCropper.h"
#import "HHCameraImageModel.h"
#import "PhotoPicker.h"
#import "HHCameraUtil.h"
#import "HHPHAssetManager.h"
#import "DACircularProgressView.h"
#import "DALabeledCircularProgressView.h"
#import "IDMCaptionView.h"
#import "IDMPBConstants.h"
#import "IDMPhoto.h"
#import "IDMPhotoBrowser.h"
#import "IDMPhotoProtocol.h"
#import "IDMTapDetectingImageView.h"
#import "IDMTapDetectingView.h"
#import "IDMZoomingScrollView.h"
#import "HHAnimatedImageRep.h"
#import "HHImageCache.h"
#import "HHImageCacheConfig.h"
... ... @@ -84,6 +82,18 @@
#import "UIImageView+hhWebCache.h"
#import "UIView+hhWebCache.h"
#import "UIView+hhWebCacheOperation.h"
#import "CGGeometry+RSKImageCropper.h"
#import "RSKImageCropper.h"
#import "RSKImageCropViewController+Protected.h"
#import "RSKImageCropViewController.h"
#import "RSKImageScrollView.h"
#import "RSKTouchView.h"
#import "UIApplication+RSKImageCropper.h"
#import "UIImage+RSKImageCropper.h"
#import "HHCameraImageModel.h"
#import "PhotoPicker.h"
#import "HHCameraUtil.h"
#import "HHPHAssetManager.h"
FOUNDATION_EXPORT double HHDoctorSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char HHDoctorSDKVersionString[];
... ...
//
// IDMCaptionView.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 30/12/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "IDMPhotoProtocol.h"
@interface IDMCaptionView : UIView
@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong, readonly) id<IDMPhoto> photo;
// Init
- (id)initWithPhoto:(id<IDMPhoto>)photo;
// To create your own custom caption view, subclass this view
// and override the following two methods (as well as any other
// UIView methods that you see fit):
// Override -setupCaption so setup your subviews and customise the appearance
// of your custom caption
// You can access the photo's data by accessing the _photo ivar
// If you need more data per photo then simply subclass IDMPhoto and return your
// subclass to the photo browsers -photoBrowser:photoAtIndex: delegate method
- (void)setupCaption;
// Override -sizeThatFits: and return a CGSize specifying the height of your
// custom caption view. With width property is ignored and the caption is displayed
// the full width of the screen
- (CGSize)sizeThatFits:(CGSize)size;
@end
... ...
//
// IDMPhotoBrowserConstants.h
// PhotoBrowserDemo
//
// Created by Eduardo Callado on 10/7/13.
//
//
#define PADDING 10
#define PAGE_INDEX_TAG_OFFSET 1000
#define PAGE_INDEX(page) ([(page) tag] - PAGE_INDEX_TAG_OFFSET)
// Debug Logging
#if 0 // Set to 1 to enable debug logging
#define IDMLog(x, ...) NSLog(x, ## __VA_ARGS__);
#else
#define IDMLog(x, ...)
#endif
//
// System Versioning Preprocessor Macros
//
//#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
//#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
//#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
//#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
//#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
... ...
//
// IDMPhoto.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 17/10/2010.
// Copyright 2010 d3i. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IDMPhotoProtocol.h"
#import "HHWebImageManager.h"
//#import <SDWebImage/SDWebImageManager.h>
// This class models a photo/image and it's caption
// If you want to handle photos, caching, decompression
// yourself then you can simply ensure your custom data model
// conforms to IDMPhotoProtocol
@interface IDMPhoto : NSObject <IDMPhoto>
// Progress download block, used to update the circularView
typedef void (^IDMProgressUpdateBlock)(CGFloat progress);
// Properties
@property (nonatomic, strong) NSString *caption;
@property (nonatomic, strong) NSURL *photoURL;
@property (nonatomic, strong) IDMProgressUpdateBlock progressUpdateBlock;
@property (nonatomic, strong) UIImage *placeholderImage;
// Class
+ (IDMPhoto *)photoWithImage:(UIImage *)image;
+ (IDMPhoto *)photoWithFilePath:(NSString *)path;
+ (IDMPhoto *)photoWithURL:(NSURL *)url;
+ (NSArray *)photosWithImages:(NSArray *)imagesArray;
+ (NSArray *)photosWithFilePaths:(NSArray *)pathsArray;
+ (NSArray *)photosWithURLs:(NSArray *)urlsArray;
// Init
- (id)initWithImage:(UIImage *)image;
- (id)initWithFilePath:(NSString *)path;
- (id)initWithURL:(NSURL *)url;
@end
... ...
//
// IDMPhotoBrowser.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 14/10/2010.
// Copyright 2010 d3i. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import "IDMPhoto.h"
#import "IDMPhotoProtocol.h"
#import "IDMCaptionView.h"
#import "IDMTapDetectingImageView.h"
// Delgate
@class IDMPhotoBrowser;
@protocol IDMPhotoBrowserDelegate <NSObject>
@optional
- (void)willAppearPhotoBrowser:(IDMPhotoBrowser *)photoBrowser;
- (void)willDisappearPhotoBrowser:(IDMPhotoBrowser *)photoBrowser;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didShowPhotoAtIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didDismissAtPageIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser willDismissAtPageIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didDismissActionSheetWithButtonIndex:(NSUInteger)buttonIndex photoIndex:(NSUInteger)photoIndex;
- (IDMCaptionView *)photoBrowser:(IDMPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index;
- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser imageFailed:(NSUInteger)index imageView:(IDMTapDetectingImageView *)imageView;
@end
// IDMPhotoBrowser
@interface IDMPhotoBrowser : UIViewController <UIScrollViewDelegate, UIActionSheetDelegate>
// Properties
@property (nonatomic, strong) id <IDMPhotoBrowserDelegate> delegate;
// Toolbar customization
@property (nonatomic) BOOL displayToolbar;
@property (nonatomic) BOOL displayCounterLabel;
@property (nonatomic) BOOL displayArrowButton;
@property (nonatomic) BOOL displayActionButton;
@property (nonatomic, strong) NSArray *actionButtonTitles;
@property (nonatomic, weak) UIImage *leftArrowImage, *leftArrowSelectedImage;
@property (nonatomic, weak) UIImage *rightArrowImage, *rightArrowSelectedImage;
@property (nonatomic, weak) UIImage *actionButtonImage, *actionButtonSelectedImage;
// View customization
@property (nonatomic) BOOL displayDoneButton;
@property (nonatomic) BOOL useWhiteBackgroundColor;
@property (nonatomic, weak) UIImage *doneButtonImage;
@property (nonatomic, weak) UIColor *trackTintColor, *progressTintColor;
@property (nonatomic, assign) CGFloat doneButtonRightInset, doneButtonTopInset;
@property (nonatomic, assign) CGSize doneButtonSize;
@property (nonatomic, weak) UIImage *scaleImage;
@property (nonatomic) BOOL arrowButtonsChangePhotosAnimated;
@property (nonatomic) BOOL forceHideStatusBar;
@property (nonatomic) BOOL usePopAnimation;
@property (nonatomic) BOOL disableVerticalSwipe;
@property (nonatomic) BOOL dismissOnTouch;
// Default value: true
// Set to false to tell the photo viewer not to hide the interface when scrolling
@property (nonatomic) BOOL autoHideInterface;
// Defines zooming of the background (default 1.0)
@property (nonatomic) float backgroundScaleFactor;
// Animation time (default .28)
@property (nonatomic) float animationDuration;
// Init
- (id)initWithPhotos:(NSArray *)photosArray;
// Init (animated from view)
- (id)initWithPhotos:(NSArray *)photosArray animatedFromView:(UIView*)view;
// Init with NSURL objects
- (id)initWithPhotoURLs:(NSArray *)photoURLsArray;
// Init with NSURL objects (animated from view)
- (id)initWithPhotoURLs:(NSArray *)photoURLsArray animatedFromView:(UIView*)view;
// Reloads the photo browser and refetches data
- (void)reloadData;
// Set page that photo browser starts on
- (void)setInitialPageIndex:(NSUInteger)index;
// Get IDMPhoto at index
- (id<IDMPhoto>)photoAtIndex:(NSUInteger)index;
@end
... ...
//
// IDMPhotoProtocol.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 02/01/2012.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "IDMPBConstants.h"
// Name of notification used when a photo has completed loading process
// Used to notify browser display the image
#define IDMPhoto_LOADING_DID_END_NOTIFICATION @"IDMPhoto_LOADING_DID_END_NOTIFICATION"
// If you wish to use your own data models for photo then they must conform
// to this protocol. See instructions for details on each method.
// Otherwise you can use the IDMPhoto object or subclass it yourself to
// store more information per photo.
//
// You can see the IDMPhoto class for an example implementation of this protocol
//
@protocol IDMPhoto <NSObject>
@required
// Return underlying UIImage to be displayed
// Return nil if the image is not immediately available (loaded into memory, preferably
// already decompressed) and needs to be loaded from a source (cache, file, web, etc)
// IMPORTANT: You should *NOT* use this method to initiate
// fetching of images from any external of source. That should be handled
// in -loadUnderlyingImageAndNotify: which may be called by the photo browser if this
// methods returns nil.
- (UIImage *)underlyingImage;
// Called when the browser has determined the underlying images is not
// already loaded into memory but needs it.
// You must load the image asyncronously (and decompress it for better performance).
// See IDMPhoto object for an example implementation.
// When the underlying UIImage is loaded (or failed to load) you should post the following
// notification:
//
// [[NSNotificationCenter defaultCenter] postNotificationName:IDMPhoto_LOADING_DID_END_NOTIFICATION
// object:self];
//
- (void)loadUnderlyingImageAndNotify;
// This is called when the photo browser has determined the photo data
// is no longer needed or there are low memory conditions
// You should release any underlying (possibly large and decompressed) image data
// as long as the image can be re-loaded (from cache, file, or URL)
- (void)unloadUnderlyingImage;
@optional
// Return a caption string to be displayed over the image
// Return nil to display no caption
- (NSString *)caption;
// Return placeholder UIImage to be displayed while loading underlyingImage
// Return nil if there is no placeholder
- (UIImage *)placeholderImage;
@end
... ...
//
// IDMTapDetectingImageView.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 04/11/2009.
// Copyright 2009 d3i. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@protocol IDMTapDetectingImageViewDelegate;
@interface IDMTapDetectingImageView : UIImageView {
id <IDMTapDetectingImageViewDelegate> __weak tapDelegate;
}
@property (nonatomic, weak) id <IDMTapDetectingImageViewDelegate> tapDelegate;
- (void)handleSingleTap:(UITouch *)touch;
- (void)handleDoubleTap:(UITouch *)touch;
- (void)handleTripleTap:(UITouch *)touch;
@end
@protocol IDMTapDetectingImageViewDelegate <NSObject>
@optional
- (void)imageView:(UIImageView *)imageView singleTapDetected:(UITouch *)touch;
- (void)imageView:(UIImageView *)imageView doubleTapDetected:(UITouch *)touch;
- (void)imageView:(UIImageView *)imageView tripleTapDetected:(UITouch *)touch;
@end
... ...
//
// IDMTapDetectingView.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 04/11/2009.
// Copyright 2009 d3i. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@protocol IDMTapDetectingViewDelegate;
@interface IDMTapDetectingView : UIView {
id <IDMTapDetectingViewDelegate> __weak tapDelegate;
}
@property (nonatomic, weak) id <IDMTapDetectingViewDelegate> tapDelegate;
- (void)handleSingleTap:(UITouch *)touch;
- (void)handleDoubleTap:(UITouch *)touch;
- (void)handleTripleTap:(UITouch *)touch;
@end
@protocol IDMTapDetectingViewDelegate <NSObject>
@optional
- (void)view:(UIView *)view singleTapDetected:(UITouch *)touch;
- (void)view:(UIView *)view doubleTapDetected:(UITouch *)touch;
- (void)view:(UIView *)view tripleTapDetected:(UITouch *)touch;
@end
... ...
//
// IDMZoomingScrollView.h
// IDMPhotoBrowser
//
// Created by Michael Waterfall on 14/10/2010.
// Copyright 2010 d3i. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IDMPhotoProtocol.h"
#import "IDMTapDetectingImageView.h"
#import "IDMTapDetectingView.h"
#import "DACircularProgressView.h"
@class IDMPhotoBrowser, IDMPhoto, IDMCaptionView;
@interface IDMZoomingScrollView : UIScrollView <UIScrollViewDelegate, IDMTapDetectingImageViewDelegate, IDMTapDetectingViewDelegate> {
IDMPhotoBrowser *__weak _photoBrowser;
id<IDMPhoto> _photo;
// This view references the related caption view for simplified handling in photo browser
IDMCaptionView *_captionView;
IDMTapDetectingView *_tapView; // for background taps
DACircularProgressView *_progressView;
}
@property (nonatomic, strong) IDMTapDetectingImageView *photoImageView;
@property (nonatomic, strong) IDMCaptionView *captionView;
@property (nonatomic, strong) id<IDMPhoto> photo;
@property (nonatomic) CGFloat maximumDoubleTapZoomScale;
- (id)initWithPhotoBrowser:(IDMPhotoBrowser *)browser;
- (void)displayImage;
- (void)displayImageFailure;
- (void)setProgress:(CGFloat)progress forPhoto:(IDMPhoto*)photo;
- (void)setMaxMinZoomScalesForCurrentBounds;
- (void)prepareForReuse;
@end
... ...
... ... @@ -14,4 +14,10 @@
width:(NSUInteger)width
height:(NSUInteger)height;
- (void)clearData;
- (void)addBlack:(CGRect)rect;
- (void)clearBack;
@end
... ...
/* No comment provided by engineer. */
"Cancel" = "Abbrechen";
/* Informing the user an item has finished copying */
"Copied" = "Kopiert";
/* No comment provided by engineer. */
"Copy" = "Kopieren";
/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */
"Copying" = "Kopiere";
/* No comment provided by engineer. */
"Dismiss" = "Schließen";
/* No comment provided by engineer. */
"Done" = "Fertig";
/* No comment provided by engineer. */
"Email" = "Email";
/* No comment provided by engineer. */
"Email failed to send. Please try again." = "Senden fehlgeschlagen. Bitte erneut versuchen.";
/* Informing the user a process has failed */
"Failed" = "Fehlgeschlagen";
/* Used in the context: 'Showing 1 of 3 items' */
"of" = "von";
/* No comment provided by engineer. */
"Photo" = "Foto";
/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */
"Preparing" = "Vorbereiten";
/* No comment provided by engineer. */
"Save" = "Sichern";
/* Informing the user an item has been saved */
"Saved" = "Gesichert";
/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */
"Saving" = "Sichere";
... ...
/* No comment provided by engineer. */
"Cancel" = "キャンセル";
/* Informing the user an item has finished copying */
"Copied" = "コピーされました";
/* No comment provided by engineer. */
"Copy" = "コピー";
/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */
"Copying" = "コピー中";
/* No comment provided by engineer. */
"Dismiss" = "閉じる";
/* No comment provided by engineer. */
"Done" = "完了";
/* No comment provided by engineer. */
"Email" = "メール";
/* No comment provided by engineer. */
"Email failed to send. Please try again." = "メールの送信に失敗しました。もう一度送信してください。";
/* Informing the user a process has failed */
"Failed" = "失敗しました";
/* Used in the context: 'Showing 1 of 3 items' */
"of" = "/";
/* No comment provided by engineer. */
"Photo" = "写真";
/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */
"Preparing" = "読み込み中";
/* No comment provided by engineer. */
"Save" = "保存";
/* Informing the user an item has been saved */
"Saved" = "保存されました";
/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */
"Saving" = "保存中";
... ...
/* No comment provided by engineer. */
"Cancel" = "Annuleer";
/* Informing the user an item has finished copying */
"Copied" = "Gekopieerd";
/* No comment provided by engineer. */
"Copy" = "Kopieer";
/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */
"Copying" = "Kopieer";
/* No comment provided by engineer. */
"Dismiss" = "Annuleer";
/* No comment provided by engineer. */
"Done" = "Klaar";
/* No comment provided by engineer. */
"Email" = "E-mail";
/* No comment provided by engineer. */
"Email failed to send. Please try again." = "Het versturen van de e-mail is mislukt. Probeer opnieuw.";
/* Informing the user a process has failed */
"Failed" = "Mislukt";
/* Used in the context: 'Showing 1 of 3 items' */
"of" = "of";
/* No comment provided by engineer. */
"Photo" = "Foto";
/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */
"Preparing" = "Voorbereiden";
/* No comment provided by engineer. */
"Save" = "Opslaan";
/* Informing the user an item has been saved */
"Saved" = "Opgeslagen";
/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */
"Saving" = "Opslaan";
... ...
/* No comment provided by engineer. */
"Cancel" = "Cancelar";
/* Informing the user an item has finished copying */
"Copied" = "Copiado";
/* No comment provided by engineer. */
"Copy" = "Copiar";
/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */
"Copying" = "Copiando";
/* No comment provided by engineer. */
"Dismiss" = "Fechar";
/* No comment provided by engineer. */
"Done" = "Fechar";
/* No comment provided by engineer. */
"Email" = "Email";
/* No comment provided by engineer. */
"Email failed to send. Please try again." = "Email falhou ao enviar. Por favor, tente novamente.";
/* Informing the user a process has failed */
"Failed" = "Falhou";
/* Used in the context: 'Showing 1 of 3 items' */
"of" = "de";
/* No comment provided by engineer. */
"Photo" = "Foto";
/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */
"Preparing" = "Preparando";
/* No comment provided by engineer. */
"Save" = "Salvar";
/* Informing the user an item has been saved */
"Saved" = "Salvada";
/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */
"Saving" = "Salvando";
... ...
... ... @@ -3,5 +3,5 @@ git commit -m "sdk init"
git pull
git push
git tag -m "tag" 1.1.2
git tag -m "tag" 1.1.3
git push --tag
... ...