Showing
61 changed files
with
1567 additions
and
0 deletions
HHIMSDK/HHIMSDK.framework/ChatBar.nib
0 → 100644
No preview for this file type
HHIMSDK/HHIMSDK.framework/HHIMSDK
0 → 100755
This file is too large to display.
No preview for this file type
No preview for this file type
No preview for this file type
| 1 | +// | ||
| 2 | +// CGGeometry+RSKImageCropper.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2015 Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +#import <CoreGraphics/CoreGraphics.h> | ||
| 26 | +#import <tgmath.h> | ||
| 27 | + | ||
| 28 | +// tgmath functions aren't used on iOS when modules are enabled. | ||
| 29 | +// Open Radar - http://www.openradar.me/16744288 | ||
| 30 | +// Work around this by redeclaring things here. | ||
| 31 | + | ||
| 32 | +#undef cos | ||
| 33 | +#define cos(__x) __tg_cos(__tg_promote1((__x))(__x)) | ||
| 34 | + | ||
| 35 | +#undef sin | ||
| 36 | +#define sin(__x) __tg_sin(__tg_promote1((__x))(__x)) | ||
| 37 | + | ||
| 38 | +#undef atan2 | ||
| 39 | +#define atan2(__x, __y) __tg_atan2(__tg_promote2((__x), (__y))(__x), \ | ||
| 40 | +__tg_promote2((__x), (__y))(__y)) | ||
| 41 | + | ||
| 42 | +#undef pow | ||
| 43 | +#define pow(__x, __y) __tg_pow(__tg_promote2((__x), (__y))(__x), \ | ||
| 44 | +__tg_promote2((__x), (__y))(__y)) | ||
| 45 | + | ||
| 46 | +#undef sqrt | ||
| 47 | +#define sqrt(__x) __tg_sqrt(__tg_promote1((__x))(__x)) | ||
| 48 | + | ||
| 49 | +#undef fabs | ||
| 50 | +#define fabs(__x) __tg_fabs(__tg_promote1((__x))(__x)) | ||
| 51 | + | ||
| 52 | +#undef ceil | ||
| 53 | +#define ceil(__x) __tg_ceil(__tg_promote1((__x))(__x)) | ||
| 54 | + | ||
| 55 | +#ifdef CGFLOAT_IS_DOUBLE | ||
| 56 | + #define RSK_EPSILON DBL_EPSILON | ||
| 57 | +#else | ||
| 58 | + #define RSK_EPSILON FLT_EPSILON | ||
| 59 | +#endif | ||
| 60 | + | ||
| 61 | +// Line segments. | ||
| 62 | +struct RSKLineSegment { | ||
| 63 | + CGPoint start; | ||
| 64 | + CGPoint end; | ||
| 65 | +}; | ||
| 66 | +typedef struct RSKLineSegment RSKLineSegment; | ||
| 67 | + | ||
| 68 | +// The "empty" point. This is the point returned when, for example, we | ||
| 69 | +// intersect two disjoint line segments. Note that the null point is not the | ||
| 70 | +// same as the zero point. | ||
| 71 | +CG_EXTERN const CGPoint RSKPointNull; | ||
| 72 | + | ||
| 73 | +// Returns the exact center point of the given rectangle. | ||
| 74 | +CGPoint RSKRectCenterPoint(CGRect rect); | ||
| 75 | + | ||
| 76 | +// Returns the `rect` scaled around the `point` by `sx` and `sy`. | ||
| 77 | +CGRect RSKRectScaleAroundPoint(CGRect rect, CGPoint point, CGFloat sx, CGFloat sy); | ||
| 78 | + | ||
| 79 | +// Returns true if `point' is the null point, false otherwise. | ||
| 80 | +bool RSKPointIsNull(CGPoint point); | ||
| 81 | + | ||
| 82 | +// Returns the `point` rotated around the `pivot` by `angle`. | ||
| 83 | +CGPoint RSKPointRotateAroundPoint(CGPoint point, CGPoint pivot, CGFloat angle); | ||
| 84 | + | ||
| 85 | +// Returns the distance between two points. | ||
| 86 | +CGFloat RSKPointDistance(CGPoint p1, CGPoint p2); | ||
| 87 | + | ||
| 88 | +// Make a line segment from two points `start` and `end`. | ||
| 89 | +RSKLineSegment RSKLineSegmentMake(CGPoint start, CGPoint end); | ||
| 90 | + | ||
| 91 | +// Returns the line segment rotated around the `pivot` by `angle`. | ||
| 92 | +RSKLineSegment RSKLineSegmentRotateAroundPoint(RSKLineSegment lineSegment, CGPoint pivot, CGFloat angle); | ||
| 93 | + | ||
| 94 | +// Returns the intersection of `ls1' and `ls2'. This may return a null point. | ||
| 95 | +CGPoint RSKLineSegmentIntersection(RSKLineSegment ls1, RSKLineSegment ls2); |
| 1 | +// Generated by Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29) | ||
| 2 | +#pragma clang diagnostic push | ||
| 3 | +#pragma clang diagnostic ignored "-Wgcc-compat" | ||
| 4 | + | ||
| 5 | +#if !defined(__has_include) | ||
| 6 | +# define __has_include(x) 0 | ||
| 7 | +#endif | ||
| 8 | +#if !defined(__has_attribute) | ||
| 9 | +# define __has_attribute(x) 0 | ||
| 10 | +#endif | ||
| 11 | +#if !defined(__has_feature) | ||
| 12 | +# define __has_feature(x) 0 | ||
| 13 | +#endif | ||
| 14 | +#if !defined(__has_warning) | ||
| 15 | +# define __has_warning(x) 0 | ||
| 16 | +#endif | ||
| 17 | + | ||
| 18 | +#if __has_include(<swift/objc-prologue.h>) | ||
| 19 | +# include <swift/objc-prologue.h> | ||
| 20 | +#endif | ||
| 21 | + | ||
| 22 | +#pragma clang diagnostic ignored "-Wauto-import" | ||
| 23 | +#include <Foundation/Foundation.h> | ||
| 24 | +#include <stdint.h> | ||
| 25 | +#include <stddef.h> | ||
| 26 | +#include <stdbool.h> | ||
| 27 | + | ||
| 28 | +#if !defined(SWIFT_TYPEDEFS) | ||
| 29 | +# define SWIFT_TYPEDEFS 1 | ||
| 30 | +# if __has_include(<uchar.h>) | ||
| 31 | +# include <uchar.h> | ||
| 32 | +# elif !defined(__cplusplus) | ||
| 33 | +typedef uint_least16_t char16_t; | ||
| 34 | +typedef uint_least32_t char32_t; | ||
| 35 | +# endif | ||
| 36 | +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); | ||
| 37 | +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); | ||
| 38 | +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); | ||
| 39 | +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); | ||
| 40 | +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); | ||
| 41 | +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); | ||
| 42 | +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); | ||
| 43 | +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); | ||
| 44 | +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); | ||
| 45 | +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); | ||
| 46 | +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); | ||
| 47 | +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); | ||
| 48 | +#endif | ||
| 49 | + | ||
| 50 | +#if !defined(SWIFT_PASTE) | ||
| 51 | +# define SWIFT_PASTE_HELPER(x, y) x##y | ||
| 52 | +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) | ||
| 53 | +#endif | ||
| 54 | +#if !defined(SWIFT_METATYPE) | ||
| 55 | +# define SWIFT_METATYPE(X) Class | ||
| 56 | +#endif | ||
| 57 | +#if !defined(SWIFT_CLASS_PROPERTY) | ||
| 58 | +# if __has_feature(objc_class_property) | ||
| 59 | +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ | ||
| 60 | +# else | ||
| 61 | +# define SWIFT_CLASS_PROPERTY(...) | ||
| 62 | +# endif | ||
| 63 | +#endif | ||
| 64 | + | ||
| 65 | +#if __has_attribute(objc_runtime_name) | ||
| 66 | +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) | ||
| 67 | +#else | ||
| 68 | +# define SWIFT_RUNTIME_NAME(X) | ||
| 69 | +#endif | ||
| 70 | +#if __has_attribute(swift_name) | ||
| 71 | +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) | ||
| 72 | +#else | ||
| 73 | +# define SWIFT_COMPILE_NAME(X) | ||
| 74 | +#endif | ||
| 75 | +#if __has_attribute(objc_method_family) | ||
| 76 | +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) | ||
| 77 | +#else | ||
| 78 | +# define SWIFT_METHOD_FAMILY(X) | ||
| 79 | +#endif | ||
| 80 | +#if __has_attribute(noescape) | ||
| 81 | +# define SWIFT_NOESCAPE __attribute__((noescape)) | ||
| 82 | +#else | ||
| 83 | +# define SWIFT_NOESCAPE | ||
| 84 | +#endif | ||
| 85 | +#if __has_attribute(ns_consumed) | ||
| 86 | +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) | ||
| 87 | +#else | ||
| 88 | +# define SWIFT_RELEASES_ARGUMENT | ||
| 89 | +#endif | ||
| 90 | +#if __has_attribute(warn_unused_result) | ||
| 91 | +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | ||
| 92 | +#else | ||
| 93 | +# define SWIFT_WARN_UNUSED_RESULT | ||
| 94 | +#endif | ||
| 95 | +#if __has_attribute(noreturn) | ||
| 96 | +# define SWIFT_NORETURN __attribute__((noreturn)) | ||
| 97 | +#else | ||
| 98 | +# define SWIFT_NORETURN | ||
| 99 | +#endif | ||
| 100 | +#if !defined(SWIFT_CLASS_EXTRA) | ||
| 101 | +# define SWIFT_CLASS_EXTRA | ||
| 102 | +#endif | ||
| 103 | +#if !defined(SWIFT_PROTOCOL_EXTRA) | ||
| 104 | +# define SWIFT_PROTOCOL_EXTRA | ||
| 105 | +#endif | ||
| 106 | +#if !defined(SWIFT_ENUM_EXTRA) | ||
| 107 | +# define SWIFT_ENUM_EXTRA | ||
| 108 | +#endif | ||
| 109 | +#if !defined(SWIFT_CLASS) | ||
| 110 | +# if __has_attribute(objc_subclassing_restricted) | ||
| 111 | +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA | ||
| 112 | +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA | ||
| 113 | +# else | ||
| 114 | +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA | ||
| 115 | +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA | ||
| 116 | +# endif | ||
| 117 | +#endif | ||
| 118 | +#if !defined(SWIFT_RESILIENT_CLASS) | ||
| 119 | +# if __has_attribute(objc_class_stub) | ||
| 120 | +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) | ||
| 121 | +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) | ||
| 122 | +# else | ||
| 123 | +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) | ||
| 124 | +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) | ||
| 125 | +# endif | ||
| 126 | +#endif | ||
| 127 | + | ||
| 128 | +#if !defined(SWIFT_PROTOCOL) | ||
| 129 | +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA | ||
| 130 | +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA | ||
| 131 | +#endif | ||
| 132 | + | ||
| 133 | +#if !defined(SWIFT_EXTENSION) | ||
| 134 | +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) | ||
| 135 | +#endif | ||
| 136 | + | ||
| 137 | +#if !defined(OBJC_DESIGNATED_INITIALIZER) | ||
| 138 | +# if __has_attribute(objc_designated_initializer) | ||
| 139 | +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 140 | +# else | ||
| 141 | +# define OBJC_DESIGNATED_INITIALIZER | ||
| 142 | +# endif | ||
| 143 | +#endif | ||
| 144 | +#if !defined(SWIFT_ENUM_ATTR) | ||
| 145 | +# if defined(__has_attribute) && __has_attribute(enum_extensibility) | ||
| 146 | +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) | ||
| 147 | +# else | ||
| 148 | +# define SWIFT_ENUM_ATTR(_extensibility) | ||
| 149 | +# endif | ||
| 150 | +#endif | ||
| 151 | +#if !defined(SWIFT_ENUM) | ||
| 152 | +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type | ||
| 153 | +# if __has_feature(generalized_swift_name) | ||
| 154 | +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type | ||
| 155 | +# else | ||
| 156 | +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) | ||
| 157 | +# endif | ||
| 158 | +#endif | ||
| 159 | +#if !defined(SWIFT_UNAVAILABLE) | ||
| 160 | +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) | ||
| 161 | +#endif | ||
| 162 | +#if !defined(SWIFT_UNAVAILABLE_MSG) | ||
| 163 | +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) | ||
| 164 | +#endif | ||
| 165 | +#if !defined(SWIFT_AVAILABILITY) | ||
| 166 | +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) | ||
| 167 | +#endif | ||
| 168 | +#if !defined(SWIFT_WEAK_IMPORT) | ||
| 169 | +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) | ||
| 170 | +#endif | ||
| 171 | +#if !defined(SWIFT_DEPRECATED) | ||
| 172 | +# define SWIFT_DEPRECATED __attribute__((deprecated)) | ||
| 173 | +#endif | ||
| 174 | +#if !defined(SWIFT_DEPRECATED_MSG) | ||
| 175 | +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) | ||
| 176 | +#endif | ||
| 177 | +#if __has_feature(attribute_diagnose_if_objc) | ||
| 178 | +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) | ||
| 179 | +#else | ||
| 180 | +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) | ||
| 181 | +#endif | ||
| 182 | +#if !defined(IBSegueAction) | ||
| 183 | +# define IBSegueAction | ||
| 184 | +#endif | ||
| 185 | +#if __has_feature(modules) | ||
| 186 | +#if __has_warning("-Watimport-in-framework-header") | ||
| 187 | +#pragma clang diagnostic ignored "-Watimport-in-framework-header" | ||
| 188 | +#endif | ||
| 189 | +@import CoreLocation; | ||
| 190 | +@import Foundation; | ||
| 191 | +@import ObjectiveC; | ||
| 192 | +@import Photos; | ||
| 193 | +@import UIKit; | ||
| 194 | +@import WebKit; | ||
| 195 | +#endif | ||
| 196 | + | ||
| 197 | +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" | ||
| 198 | +#pragma clang diagnostic ignored "-Wduplicate-method-arg" | ||
| 199 | +#if __has_warning("-Wpragma-clang-attribute") | ||
| 200 | +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" | ||
| 201 | +#endif | ||
| 202 | +#pragma clang diagnostic ignored "-Wunknown-pragmas" | ||
| 203 | +#pragma clang diagnostic ignored "-Wnullability" | ||
| 204 | + | ||
| 205 | +#if __has_attribute(external_source_symbol) | ||
| 206 | +# pragma push_macro("any") | ||
| 207 | +# undef any | ||
| 208 | +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="HHIMSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) | ||
| 209 | +# pragma pop_macro("any") | ||
| 210 | +#endif | ||
| 211 | + | ||
| 212 | + | ||
| 213 | + | ||
| 214 | + | ||
| 215 | + | ||
| 216 | + | ||
| 217 | + | ||
| 218 | +@class HHSDKOptions; | ||
| 219 | + | ||
| 220 | +SWIFT_CLASS("_TtC7HHIMSDK7HHIMSDK") | ||
| 221 | +@interface HHIMSDK : NSObject | ||
| 222 | +/// 初始化 SDK | ||
| 223 | +/// \param option 可选的 SDK 配置 | ||
| 224 | +/// | ||
| 225 | +- (void)startWithOption:(HHSDKOptions * _Nonnull)option; | ||
| 226 | +/// 登录账户 | ||
| 227 | +/// \param userToken 用户的唯一标识符 | ||
| 228 | +/// | ||
| 229 | +/// \param completion 完成的回调 | ||
| 230 | +/// | ||
| 231 | +- (void)loginWithUserToken:(NSString * _Nonnull)userToken completion:(void (^ _Nonnull)(NSString * _Nullable))completion; | ||
| 232 | +/// 退出登录 | ||
| 233 | +/// \param complete 退出完成后的回调 | ||
| 234 | +/// | ||
| 235 | +- (void)logoutWithComplete:(void (^ _Nonnull)(NSString * _Nullable))complete; | ||
| 236 | +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; | ||
| 237 | +@end | ||
| 238 | + | ||
| 239 | +@class UIViewController; | ||
| 240 | + | ||
| 241 | +@interface HHIMSDK (SWIFT_EXTENSION(HHIMSDK)) | ||
| 242 | +/// 获取信息流控制器 | ||
| 243 | +/// \param userToken 用户唯一标志 | ||
| 244 | +/// | ||
| 245 | +/// | ||
| 246 | +/// returns: | ||
| 247 | +/// 返回控制器 | ||
| 248 | +- (UIViewController * _Nullable)informationFlow:(NSString * _Nullable)userToken SWIFT_WARN_UNUSED_RESULT; | ||
| 249 | +/// 获取订单列表控制器 | ||
| 250 | +/// \param userToken 用户唯一标志 | ||
| 251 | +/// | ||
| 252 | +/// | ||
| 253 | +/// returns: | ||
| 254 | +/// 返回控制器 | ||
| 255 | +- (UIViewController * _Nullable)orderList:(NSString * _Nullable)userToken SWIFT_WARN_UNUSED_RESULT; | ||
| 256 | +/// 获取订单详情控制器 | ||
| 257 | +/// \param userToken 用户唯一标志 | ||
| 258 | +/// | ||
| 259 | +/// \param orderId 订单id | ||
| 260 | +/// | ||
| 261 | +/// \param paySuccess 支付成功回调(当前控制器,订单id)(关闭控制器等其他操作) | ||
| 262 | +/// | ||
| 263 | +/// | ||
| 264 | +/// returns: | ||
| 265 | +/// 返回控制器 | ||
| 266 | +- (UIViewController * _Nullable)orderDetail:(NSString * _Nullable)userToken orderId:(NSString * _Nonnull)orderId paySuccess:(void (^ _Nonnull)(UIViewController * _Nonnull, NSString * _Nonnull))paySuccess SWIFT_WARN_UNUSED_RESULT; | ||
| 267 | +/// 获取地址列表控制器 | ||
| 268 | +/// \param userToken 用户唯一标志 | ||
| 269 | +/// | ||
| 270 | +/// | ||
| 271 | +/// returns: | ||
| 272 | +/// 返回控制器 | ||
| 273 | +- (UIViewController * _Nullable)addressList:(NSString * _Nullable)userToken SWIFT_WARN_UNUSED_RESULT; | ||
| 274 | +@end | ||
| 275 | + | ||
| 276 | + | ||
| 277 | +SWIFT_PROTOCOL("_TtP7HHIMSDK14HHPayMedicable_") | ||
| 278 | +@protocol HHPayMedicable | ||
| 279 | +- (BOOL)payInterceptor:(NSString * _Nonnull)url scheme:(NSString * _Nonnull)scheme callback:(void (^ _Nonnull)(NSDictionary * _Nullable))callback SWIFT_WARN_UNUSED_RESULT; | ||
| 280 | +@end | ||
| 281 | + | ||
| 282 | + | ||
| 283 | + | ||
| 284 | + | ||
| 285 | + | ||
| 286 | + | ||
| 287 | + | ||
| 288 | + | ||
| 289 | + | ||
| 290 | + | ||
| 291 | + | ||
| 292 | + | ||
| 293 | + | ||
| 294 | + | ||
| 295 | + | ||
| 296 | + | ||
| 297 | + | ||
| 298 | + | ||
| 299 | + | ||
| 300 | + | ||
| 301 | + | ||
| 302 | + | ||
| 303 | + | ||
| 304 | + | ||
| 305 | + | ||
| 306 | + | ||
| 307 | + | ||
| 308 | + | ||
| 309 | + | ||
| 310 | + | ||
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 314 | + | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + | ||
| 318 | + | ||
| 319 | + | ||
| 320 | + | ||
| 321 | + | ||
| 322 | + | ||
| 323 | + | ||
| 324 | + | ||
| 325 | + | ||
| 326 | + | ||
| 327 | + | ||
| 328 | + | ||
| 329 | + | ||
| 330 | + | ||
| 331 | +SWIFT_CLASS("_TtC7HHIMSDK25WKWebViewJavascriptBridge") SWIFT_AVAILABILITY(ios,introduced=9.0) | ||
| 332 | +@interface WKWebViewJavascriptBridge : NSObject | ||
| 333 | +- (nonnull instancetype)init SWIFT_UNAVAILABLE; | ||
| 334 | ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); | ||
| 335 | +@end | ||
| 336 | + | ||
| 337 | + | ||
| 338 | + | ||
| 339 | +@class WKUserContentController; | ||
| 340 | +@class WKScriptMessage; | ||
| 341 | + | ||
| 342 | +@interface WKWebViewJavascriptBridge (SWIFT_EXTENSION(HHIMSDK)) <WKScriptMessageHandler> | ||
| 343 | +- (void)userContentController:(WKUserContentController * _Nonnull)userContentController didReceiveScriptMessage:(WKScriptMessage * _Nonnull)message; | ||
| 344 | +@end | ||
| 345 | + | ||
| 346 | + | ||
| 347 | +SWIFT_CLASS("_TtC7HHIMSDK29WKWebViewJavascriptBridgeBase") SWIFT_AVAILABILITY(ios,introduced=9.0) | ||
| 348 | +@interface WKWebViewJavascriptBridgeBase : NSObject | ||
| 349 | +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; | ||
| 350 | +@end | ||
| 351 | + | ||
| 352 | +#if __has_attribute(external_source_symbol) | ||
| 353 | +# pragma clang attribute pop | ||
| 354 | +#endif | ||
| 355 | +#pragma clang diagnostic pop |
| 1 | +#ifdef __OBJC__ | ||
| 2 | +#import <UIKit/UIKit.h> | ||
| 3 | +#else | ||
| 4 | +#ifndef FOUNDATION_EXPORT | ||
| 5 | +#if defined(__cplusplus) | ||
| 6 | +#define FOUNDATION_EXPORT extern "C" | ||
| 7 | +#else | ||
| 8 | +#define FOUNDATION_EXPORT extern | ||
| 9 | +#endif | ||
| 10 | +#endif | ||
| 11 | +#endif | ||
| 12 | + | ||
| 13 | +#import "HHMBProgressHUD.h" | ||
| 14 | +#import "CGGeometry+RSKImageCropper2.h" | ||
| 15 | +#import "RSKImageCropVC.h" | ||
| 16 | +#import "RSKImageCropViewController+Protected.h" | ||
| 17 | +#import "SDKImageCropper.h" | ||
| 18 | +#import "SDKImageScrollView.h" | ||
| 19 | +#import "SDKTouchView.h" | ||
| 20 | +#import "UIApplication+RSKImageCropper2.h" | ||
| 21 | +#import "UIImage+RSKImageCropper2.h" | ||
| 22 | +#import "SDKCameraImageModel.h" | ||
| 23 | +#import "SDKCameraUtil.h" | ||
| 24 | +#import "SDKPHAssetManager.h" | ||
| 25 | + | ||
| 26 | +FOUNDATION_EXPORT double HHIMSDKVersionNumber; | ||
| 27 | +FOUNDATION_EXPORT const unsigned char HHIMSDKVersionString[]; | ||
| 28 | + |
| 1 | +// | ||
| 2 | +// MBProgressHUD.h | ||
| 3 | +// Version 1.1.0 | ||
| 4 | +// Created by Matej Bukovinski on 2.4.09. | ||
| 5 | +// | ||
| 6 | + | ||
| 7 | +// This code is distributed under the terms and conditions of the MIT license. | ||
| 8 | + | ||
| 9 | +// Copyright © 2009-2016 Matej Bukovinski | ||
| 10 | +// | ||
| 11 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 12 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 13 | +// in the Software without restriction, including without limitation the rights | ||
| 14 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 15 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 16 | +// furnished to do so, subject to the following conditions: | ||
| 17 | +// | ||
| 18 | +// The above copyright notice and this permission notice shall be included in | ||
| 19 | +// all copies or substantial portions of the Software. | ||
| 20 | +// | ||
| 21 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 22 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 23 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 24 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 25 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 26 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 27 | +// THE SOFTWARE. | ||
| 28 | + | ||
| 29 | +#import <Foundation/Foundation.h> | ||
| 30 | +#import <UIKit/UIKit.h> | ||
| 31 | +#import <CoreGraphics/CoreGraphics.h> | ||
| 32 | + | ||
| 33 | +@class HH_MBBackgroundView; | ||
| 34 | +@protocol HH_MBProgressHUDDelegate; | ||
| 35 | + | ||
| 36 | + | ||
| 37 | +extern CGFloat const HH_MBProgressMaxOffset; | ||
| 38 | + | ||
| 39 | +typedef NS_ENUM(NSInteger, HH_MBProgressHUDMode) { | ||
| 40 | + /// UIActivityIndicatorView. | ||
| 41 | + MBProgressHUDModeIndeterminate, | ||
| 42 | + /// A round, pie-chart like, progress view. | ||
| 43 | + MBProgressHUDModeDeterminate, | ||
| 44 | + /// Horizontal progress bar. | ||
| 45 | + MBProgressHUDModeDeterminateHorizontalBar, | ||
| 46 | + /// Ring-shaped progress view. | ||
| 47 | + MBProgressHUDModeAnnularDeterminate, | ||
| 48 | + /// Shows a custom view. | ||
| 49 | + MBProgressHUDModeCustomView, | ||
| 50 | + /// Shows only labels. | ||
| 51 | + MBProgressHUDModeText | ||
| 52 | +}; | ||
| 53 | + | ||
| 54 | +typedef NS_ENUM(NSInteger, HH_MBProgressHUDAnimation) { | ||
| 55 | + /// Opacity animation | ||
| 56 | + MBProgressHUDAnimationFade, | ||
| 57 | + /// Opacity + scale animation (zoom in when appearing zoom out when disappearing) | ||
| 58 | + MBProgressHUDAnimationZoom, | ||
| 59 | + /// Opacity + scale animation (zoom out style) | ||
| 60 | + MBProgressHUDAnimationZoomOut, | ||
| 61 | + /// Opacity + scale animation (zoom in style) | ||
| 62 | + MBProgressHUDAnimationZoomIn | ||
| 63 | +}; | ||
| 64 | + | ||
| 65 | +typedef NS_ENUM(NSInteger, HH_MBProgressHUDBackgroundStyle) { | ||
| 66 | + /// Solid color background | ||
| 67 | + MBProgressHUDBackgroundStyleSolidColor, | ||
| 68 | + /// UIVisualEffectView or UIToolbar.layer background view | ||
| 69 | + MBProgressHUDBackgroundStyleBlur | ||
| 70 | +}; | ||
| 71 | + | ||
| 72 | +typedef void (^HH_MBProgressHUDCompletionBlock)(void); | ||
| 73 | + | ||
| 74 | + | ||
| 75 | +NS_ASSUME_NONNULL_BEGIN | ||
| 76 | + | ||
| 77 | + | ||
| 78 | +/** | ||
| 79 | + * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. | ||
| 80 | + * | ||
| 81 | + * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. | ||
| 82 | + * The MBProgressHUD window spans over the entire space given to it by the initWithFrame: constructor and catches all | ||
| 83 | + * user input on this region, thereby preventing the user operations on components below the view. | ||
| 84 | + * | ||
| 85 | + * @note To still allow touches to pass through the HUD, you can set hud.userInteractionEnabled = NO. | ||
| 86 | + * @attention MBProgressHUD is a UI class and should therefore only be accessed on the main thread. | ||
| 87 | + */ | ||
| 88 | +@interface HH_MBProgressHUD : UIView | ||
| 89 | + | ||
| 90 | +/** | ||
| 91 | + * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. | ||
| 92 | + * | ||
| 93 | + * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. | ||
| 94 | + * | ||
| 95 | + * @param view The view that the HUD will be added to | ||
| 96 | + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use | ||
| 97 | + * animations while appearing. | ||
| 98 | + * @return A reference to the created HUD. | ||
| 99 | + * | ||
| 100 | + * @see hideHUDForView:animated: | ||
| 101 | + * @see animationType | ||
| 102 | + */ | ||
| 103 | ++ (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; | ||
| 104 | + | ||
| 105 | +/// @name Showing and hiding | ||
| 106 | + | ||
| 107 | +/** | ||
| 108 | + * Finds the top-most HUD subview that hasn't finished and hides it. The counterpart to this method is showHUDAddedTo:animated:. | ||
| 109 | + * | ||
| 110 | + * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. | ||
| 111 | + * | ||
| 112 | + * @param view The view that is going to be searched for a HUD subview. | ||
| 113 | + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use | ||
| 114 | + * animations while disappearing. | ||
| 115 | + * @return YES if a HUD was found and removed, NO otherwise. | ||
| 116 | + * | ||
| 117 | + * @see showHUDAddedTo:animated: | ||
| 118 | + * @see animationType | ||
| 119 | + */ | ||
| 120 | ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; | ||
| 121 | + | ||
| 122 | +/** | ||
| 123 | + * Finds the top-most HUD subview that hasn't finished and returns it. | ||
| 124 | + * | ||
| 125 | + * @param view The view that is going to be searched. | ||
| 126 | + * @return A reference to the last HUD subview discovered. | ||
| 127 | + */ | ||
| 128 | ++ (nullable HH_MBProgressHUD *)HUDForView:(UIView *)view; | ||
| 129 | + | ||
| 130 | +/** | ||
| 131 | + * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with | ||
| 132 | + * view.bounds as the parameter. | ||
| 133 | + * | ||
| 134 | + * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as | ||
| 135 | + * the HUD's superview (i.e., the view that the HUD will be added to). | ||
| 136 | + */ | ||
| 137 | +- (instancetype)initWithView:(UIView *)view; | ||
| 138 | + | ||
| 139 | +/** | ||
| 140 | + * Displays the HUD. | ||
| 141 | + * | ||
| 142 | + * @note You need to make sure that the main thread completes its run loop soon after this method call so that | ||
| 143 | + * the user interface can be updated. Call this method when your task is already set up to be executed in a new thread | ||
| 144 | + * (e.g., when using something like NSOperation or making an asynchronous call like NSURLRequest). | ||
| 145 | + * | ||
| 146 | + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use | ||
| 147 | + * animations while appearing. | ||
| 148 | + * | ||
| 149 | + * @see animationType | ||
| 150 | + */ | ||
| 151 | +- (void)showAnimated:(BOOL)animated; | ||
| 152 | + | ||
| 153 | +/** | ||
| 154 | + * Hides the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to | ||
| 155 | + * hide the HUD when your task completes. | ||
| 156 | + * | ||
| 157 | + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use | ||
| 158 | + * animations while disappearing. | ||
| 159 | + * | ||
| 160 | + * @see animationType | ||
| 161 | + */ | ||
| 162 | +- (void)hideAnimated:(BOOL)animated; | ||
| 163 | + | ||
| 164 | +/** | ||
| 165 | + * Hides the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to | ||
| 166 | + * hide the HUD when your task completes. | ||
| 167 | + * | ||
| 168 | + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use | ||
| 169 | + * animations while disappearing. | ||
| 170 | + * @param delay Delay in seconds until the HUD is hidden. | ||
| 171 | + * | ||
| 172 | + * @see animationType | ||
| 173 | + */ | ||
| 174 | +- (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay; | ||
| 175 | + | ||
| 176 | +/** | ||
| 177 | + * The HUD delegate object. Receives HUD state notifications. | ||
| 178 | + */ | ||
| 179 | +@property (weak, nonatomic) id<HH_MBProgressHUDDelegate> delegate; | ||
| 180 | + | ||
| 181 | +/** | ||
| 182 | + * Called after the HUD is hiden. | ||
| 183 | + */ | ||
| 184 | +@property (copy, nullable) HH_MBProgressHUDCompletionBlock completionBlock; | ||
| 185 | + | ||
| 186 | +/* | ||
| 187 | + * Grace period is the time (in seconds) that the invoked method may be run without | ||
| 188 | + * showing the HUD. If the task finishes before the grace time runs out, the HUD will | ||
| 189 | + * not be shown at all. | ||
| 190 | + * This may be used to prevent HUD display for very short tasks. | ||
| 191 | + * Defaults to 0 (no grace time). | ||
| 192 | + */ | ||
| 193 | +@property (assign, nonatomic) NSTimeInterval graceTime; | ||
| 194 | + | ||
| 195 | +/** | ||
| 196 | + * The minimum time (in seconds) that the HUD is shown. | ||
| 197 | + * This avoids the problem of the HUD being shown and than instantly hidden. | ||
| 198 | + * Defaults to 0 (no minimum show time). | ||
| 199 | + */ | ||
| 200 | +@property (assign, nonatomic) NSTimeInterval minShowTime; | ||
| 201 | + | ||
| 202 | +/** | ||
| 203 | + * Removes the HUD from its parent view when hidden. | ||
| 204 | + * Defaults to NO. | ||
| 205 | + */ | ||
| 206 | +@property (assign, nonatomic) BOOL removeFromSuperViewOnHide; | ||
| 207 | + | ||
| 208 | +/// @name Appearance | ||
| 209 | + | ||
| 210 | +/** | ||
| 211 | + * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. | ||
| 212 | + */ | ||
| 213 | +@property (assign, nonatomic) HH_MBProgressHUDMode mode; | ||
| 214 | + | ||
| 215 | +/** | ||
| 216 | + * A color that gets forwarded to all labels and supported indicators. Also sets the tintColor | ||
| 217 | + * for custom views on iOS 7+. Set to nil to manage color individually. | ||
| 218 | + * Defaults to semi-translucent black on iOS 7 and later and white on earlier iOS versions. | ||
| 219 | + */ | ||
| 220 | +@property (strong, nonatomic, nullable) UIColor *contentColor UI_APPEARANCE_SELECTOR; | ||
| 221 | + | ||
| 222 | +/** | ||
| 223 | + * The animation type that should be used when the HUD is shown and hidden. | ||
| 224 | + */ | ||
| 225 | +@property (assign, nonatomic) HH_MBProgressHUDAnimation animationType UI_APPEARANCE_SELECTOR; | ||
| 226 | + | ||
| 227 | +/** | ||
| 228 | + * The bezel offset relative to the center of the view. You can use MBProgressMaxOffset | ||
| 229 | + * and -MBProgressMaxOffset to move the HUD all the way to the screen edge in each direction. | ||
| 230 | + * E.g., CGPointMake(0.f, MBProgressMaxOffset) would position the HUD centered on the bottom edge. | ||
| 231 | + */ | ||
| 232 | +@property (assign, nonatomic) CGPoint offset UI_APPEARANCE_SELECTOR; | ||
| 233 | + | ||
| 234 | +/** | ||
| 235 | + * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). | ||
| 236 | + * This also represents the minimum bezel distance to the edge of the HUD view. | ||
| 237 | + * Defaults to 20.f | ||
| 238 | + */ | ||
| 239 | +@property (assign, nonatomic) CGFloat margin UI_APPEARANCE_SELECTOR; | ||
| 240 | + | ||
| 241 | +/** | ||
| 242 | + * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). | ||
| 243 | + */ | ||
| 244 | +@property (assign, nonatomic) CGSize minSize UI_APPEARANCE_SELECTOR; | ||
| 245 | + | ||
| 246 | +/** | ||
| 247 | + * Force the HUD dimensions to be equal if possible. | ||
| 248 | + */ | ||
| 249 | +@property (assign, nonatomic, getter = isSquare) BOOL square UI_APPEARANCE_SELECTOR; | ||
| 250 | + | ||
| 251 | +/** | ||
| 252 | + * When enabled, the bezel center gets slightly affected by the device accelerometer data. | ||
| 253 | + * Has no effect on iOS < 7.0. Defaults to YES. | ||
| 254 | + */ | ||
| 255 | +@property (assign, nonatomic, getter=areDefaultMotionEffectsEnabled) BOOL defaultMotionEffectsEnabled UI_APPEARANCE_SELECTOR; | ||
| 256 | + | ||
| 257 | +/// @name Progress | ||
| 258 | + | ||
| 259 | +/** | ||
| 260 | + * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. | ||
| 261 | + */ | ||
| 262 | +@property (assign, nonatomic) float progress; | ||
| 263 | + | ||
| 264 | +/// @name ProgressObject | ||
| 265 | + | ||
| 266 | +/** | ||
| 267 | + * The NSProgress object feeding the progress information to the progress indicator. | ||
| 268 | + */ | ||
| 269 | +@property (strong, nonatomic, nullable) NSProgress *progressObject; | ||
| 270 | + | ||
| 271 | +/// @name Views | ||
| 272 | + | ||
| 273 | +/** | ||
| 274 | + * The view containing the labels and indicator (or customView). | ||
| 275 | + */ | ||
| 276 | +@property (strong, nonatomic, readonly) HH_MBBackgroundView *bezelView; | ||
| 277 | + | ||
| 278 | +/** | ||
| 279 | + * View covering the entire HUD area, placed behind bezelView. | ||
| 280 | + */ | ||
| 281 | +@property (strong, nonatomic, readonly) HH_MBBackgroundView *backgroundView; | ||
| 282 | + | ||
| 283 | +/** | ||
| 284 | + * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. | ||
| 285 | + * The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels. | ||
| 286 | + */ | ||
| 287 | +@property (strong, nonatomic, nullable) UIView *customView; | ||
| 288 | + | ||
| 289 | +/** | ||
| 290 | + * A label that holds an optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit | ||
| 291 | + * the entire text. | ||
| 292 | + */ | ||
| 293 | +@property (strong, nonatomic, readonly) UILabel *label; | ||
| 294 | + | ||
| 295 | +/** | ||
| 296 | + * A label that holds an optional details message displayed below the labelText message. The details text can span multiple lines. | ||
| 297 | + */ | ||
| 298 | +@property (strong, nonatomic, readonly) UILabel *detailsLabel; | ||
| 299 | + | ||
| 300 | +/** | ||
| 301 | + * A button that is placed below the labels. Visible only if a target / action is added. | ||
| 302 | + */ | ||
| 303 | +//@property (strong, nonatomic, readonly) UIButton *button; | ||
| 304 | + | ||
| 305 | +@end | ||
| 306 | + | ||
| 307 | + | ||
| 308 | +@protocol HH_MBProgressHUDDelegate <NSObject> | ||
| 309 | + | ||
| 310 | +@optional | ||
| 311 | + | ||
| 312 | +/** | ||
| 313 | + * Called after the HUD was fully hidden from the screen. | ||
| 314 | + */ | ||
| 315 | +- (void)hudWasHidden:(HH_MBProgressHUD *)hud; | ||
| 316 | + | ||
| 317 | +@end | ||
| 318 | + | ||
| 319 | + | ||
| 320 | +/** | ||
| 321 | + * A progress view for showing definite progress by filling up a circle (pie chart). | ||
| 322 | + */ | ||
| 323 | +@interface HH_MBRoundProgressView : UIView | ||
| 324 | + | ||
| 325 | +/** | ||
| 326 | + * Progress (0.0 to 1.0) | ||
| 327 | + */ | ||
| 328 | +@property (nonatomic, assign) float progress; | ||
| 329 | + | ||
| 330 | +/** | ||
| 331 | + * Indicator progress color. | ||
| 332 | + * Defaults to white [UIColor whiteColor]. | ||
| 333 | + */ | ||
| 334 | +@property (nonatomic, strong) UIColor *progressTintColor; | ||
| 335 | + | ||
| 336 | +/** | ||
| 337 | + * Indicator background (non-progress) color. | ||
| 338 | + * Only applicable on iOS versions older than iOS 7. | ||
| 339 | + * Defaults to translucent white (alpha 0.1). | ||
| 340 | + */ | ||
| 341 | +@property (nonatomic, strong) UIColor *backgroundTintColor; | ||
| 342 | + | ||
| 343 | +/* | ||
| 344 | + * Display mode - NO = round or YES = annular. Defaults to round. | ||
| 345 | + */ | ||
| 346 | +@property (nonatomic, assign, getter = isAnnular) BOOL annular; | ||
| 347 | + | ||
| 348 | +@end | ||
| 349 | + | ||
| 350 | + | ||
| 351 | +/** | ||
| 352 | + * A flat bar progress view. | ||
| 353 | + */ | ||
| 354 | +@interface HH_MBBarProgressView : UIView | ||
| 355 | + | ||
| 356 | +/** | ||
| 357 | + * Progress (0.0 to 1.0) | ||
| 358 | + */ | ||
| 359 | +@property (nonatomic, assign) float progress; | ||
| 360 | + | ||
| 361 | +/** | ||
| 362 | + * Bar border line color. | ||
| 363 | + * Defaults to white [UIColor whiteColor]. | ||
| 364 | + */ | ||
| 365 | +@property (nonatomic, strong) UIColor *lineColor; | ||
| 366 | + | ||
| 367 | +/** | ||
| 368 | + * Bar background color. | ||
| 369 | + * Defaults to clear [UIColor clearColor]; | ||
| 370 | + */ | ||
| 371 | +@property (nonatomic, strong) UIColor *progressRemainingColor; | ||
| 372 | + | ||
| 373 | +/** | ||
| 374 | + * Bar progress color. | ||
| 375 | + * Defaults to white [UIColor whiteColor]. | ||
| 376 | + */ | ||
| 377 | +@property (nonatomic, strong) UIColor *progressColor; | ||
| 378 | + | ||
| 379 | +@end | ||
| 380 | + | ||
| 381 | + | ||
| 382 | +@interface HH_MBBackgroundView : UIView | ||
| 383 | + | ||
| 384 | +/** | ||
| 385 | + * The background style. | ||
| 386 | + * Defaults to MBProgressHUDBackgroundStyleBlur on iOS 7 or later and MBProgressHUDBackgroundStyleSolidColor otherwise. | ||
| 387 | + * @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions. | ||
| 388 | + */ | ||
| 389 | +@property (nonatomic) HH_MBProgressHUDBackgroundStyle style; | ||
| 390 | + | ||
| 391 | +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV | ||
| 392 | +/** | ||
| 393 | + * The blur effect style, when using MBProgressHUDBackgroundStyleBlur. | ||
| 394 | + * Defaults to UIBlurEffectStyleLight. | ||
| 395 | + */ | ||
| 396 | +@property (nonatomic) UIBlurEffectStyle blurEffectStyle; | ||
| 397 | +#endif | ||
| 398 | + | ||
| 399 | +/** | ||
| 400 | + * The background color or the blur tint color. | ||
| 401 | + * @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions. | ||
| 402 | + */ | ||
| 403 | +@property (nonatomic, strong) UIColor *color; | ||
| 404 | + | ||
| 405 | +@end | ||
| 406 | + | ||
| 407 | + | ||
| 408 | +@interface HH_MBProgressHUD (Deprecated) | ||
| 409 | + | ||
| 410 | ++ (NSArray *)allHUDsForView:(UIView *)view __attribute__((deprecated("Store references when using more than one HUD per view."))); | ||
| 411 | ++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated __attribute__((deprecated("Store references when using more than one HUD per view."))); | ||
| 412 | + | ||
| 413 | +- (id)initWithWindow:(UIWindow *)window __attribute__((deprecated("Use initWithView: instead."))); | ||
| 414 | + | ||
| 415 | +- (void)show:(BOOL)animated __attribute__((deprecated("Use showAnimated: instead."))); | ||
| 416 | +- (void)hide:(BOOL)animated __attribute__((deprecated("Use hideAnimated: instead."))); | ||
| 417 | +- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay __attribute__((deprecated("Use hideAnimated:afterDelay: instead."))); | ||
| 418 | + | ||
| 419 | +- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated __attribute__((deprecated("Use GCD directly."))); | ||
| 420 | +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block __attribute__((deprecated("Use GCD directly."))); | ||
| 421 | +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(nullable HH_MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly."))); | ||
| 422 | +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue __attribute__((deprecated("Use GCD directly."))); | ||
| 423 | +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue | ||
| 424 | + completionBlock:(nullable HH_MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly."))); | ||
| 425 | +@property (assign) BOOL taskInProgress __attribute__((deprecated("No longer needed."))); | ||
| 426 | + | ||
| 427 | +@property (nonatomic, copy) NSString *labelText __attribute__((deprecated("Use label.text instead."))); | ||
| 428 | +@property (nonatomic, strong) UIFont *labelFont __attribute__((deprecated("Use label.font instead."))); | ||
| 429 | +@property (nonatomic, strong) UIColor *labelColor __attribute__((deprecated("Use label.textColor instead."))); | ||
| 430 | +@property (nonatomic, copy) NSString *detailsLabelText __attribute__((deprecated("Use detailsLabel.text instead."))); | ||
| 431 | +@property (nonatomic, strong) UIFont *detailsLabelFont __attribute__((deprecated("Use detailsLabel.font instead."))); | ||
| 432 | +@property (nonatomic, strong) UIColor *detailsLabelColor __attribute__((deprecated("Use detailsLabel.textColor instead."))); | ||
| 433 | +@property (assign, nonatomic) CGFloat opacity __attribute__((deprecated("Customize bezelView properties instead."))); | ||
| 434 | +@property (strong, nonatomic) UIColor *color __attribute__((deprecated("Customize the bezelView color instead."))); | ||
| 435 | +@property (assign, nonatomic) CGFloat xOffset __attribute__((deprecated("Set offset.x instead."))); | ||
| 436 | +@property (assign, nonatomic) CGFloat yOffset __attribute__((deprecated("Set offset.y instead."))); | ||
| 437 | +@property (assign, nonatomic) CGFloat cornerRadius __attribute__((deprecated("Set bezelView.layer.cornerRadius instead."))); | ||
| 438 | +@property (assign, nonatomic) BOOL dimBackground __attribute__((deprecated("Customize HUD background properties instead."))); | ||
| 439 | +@property (strong, nonatomic) UIColor *activityIndicatorColor __attribute__((deprecated("Use UIAppearance to customize UIActivityIndicatorView. E.g.: [UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil].color = [UIColor redColor];"))); | ||
| 440 | +@property (atomic, assign, readonly) CGSize size __attribute__((deprecated("Get the bezelView.frame.size instead."))); | ||
| 441 | + | ||
| 442 | +@end | ||
| 443 | + | ||
| 444 | +NS_ASSUME_NONNULL_END |
| 1 | +// | ||
| 2 | +// RSKImageCropVC.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2014-present Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +#import <UIKit/UIKit.h> | ||
| 26 | + | ||
| 27 | +@protocol RSKImageCropVCDataSource; | ||
| 28 | +@protocol RSKImageCropVCDelegate; | ||
| 29 | + | ||
| 30 | +/** | ||
| 31 | + Types of supported crop modes. | ||
| 32 | + */ | ||
| 33 | +typedef NS_ENUM(NSUInteger, RSKImageCropMode) { | ||
| 34 | + RSKImageCropModeCircle, | ||
| 35 | + RSKImageCropModeSquare, | ||
| 36 | + RSKImageCropModeCustom, | ||
| 37 | + RSKImageCropModeLicense,//执照 | ||
| 38 | + RSKImageCropModeIdCard,// | ||
| 39 | + RSKImageCropModeIdCardFull,//两页展开资格证 | ||
| 40 | + | ||
| 41 | +}; | ||
| 42 | + | ||
| 43 | +@interface RSKImageCropVC : UIViewController | ||
| 44 | + | ||
| 45 | +/** | ||
| 46 | + Designated initializer. Initializes and returns a newly allocated view controller object with the specified image. | ||
| 47 | + | ||
| 48 | + @param originalImage The image for cropping. | ||
| 49 | + */ | ||
| 50 | +- (instancetype)initWithImage:(UIImage *)originalImage; | ||
| 51 | + | ||
| 52 | +/** | ||
| 53 | + Initializes and returns a newly allocated view controller object with the specified image and the specified crop mode. | ||
| 54 | + | ||
| 55 | + @param originalImage The image for cropping. | ||
| 56 | + @param cropMode The mode for cropping. | ||
| 57 | + */ | ||
| 58 | +- (instancetype)initWithImage:(UIImage *)originalImage cropMode:(RSKImageCropMode)cropMode; | ||
| 59 | + | ||
| 60 | +///----------------------------- | ||
| 61 | +/// @name Accessing the Delegate | ||
| 62 | +///----------------------------- | ||
| 63 | + | ||
| 64 | +/** | ||
| 65 | + The receiver's delegate. | ||
| 66 | + | ||
| 67 | + @discussion A `RSKImageCropVCDelegate` delegate responds to messages sent by completing / canceling crop the image in the image crop view controller. | ||
| 68 | + */ | ||
| 69 | +@property (weak, nonatomic) id<RSKImageCropVCDelegate> delegate; | ||
| 70 | + | ||
| 71 | +/** | ||
| 72 | + The receiver's data source. | ||
| 73 | + | ||
| 74 | + @discussion A `RSKImageCropVCDataSource` data source provides a custom rect and a custom path for the mask. | ||
| 75 | + */ | ||
| 76 | +@property (weak, nonatomic) id<RSKImageCropVCDataSource> dataSource; | ||
| 77 | + | ||
| 78 | +///-------------------------- | ||
| 79 | +/// @name Accessing the Image | ||
| 80 | +///-------------------------- | ||
| 81 | + | ||
| 82 | +/** | ||
| 83 | + The image for cropping. | ||
| 84 | + */ | ||
| 85 | +@property (strong, nonatomic) UIImage *originalImage; | ||
| 86 | + | ||
| 87 | +/// ----------------------------------- | ||
| 88 | +/// @name Accessing the Mask Attributes | ||
| 89 | +/// ----------------------------------- | ||
| 90 | + | ||
| 91 | +/** | ||
| 92 | + The color of the layer with the mask. Default value is [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.7f]. | ||
| 93 | + */ | ||
| 94 | +@property (strong, nonatomic) UIColor *maskLayerColor; | ||
| 95 | + | ||
| 96 | +/** | ||
| 97 | + The rect of the mask. | ||
| 98 | + | ||
| 99 | + @discussion Updating each time before the crop view lays out its subviews. | ||
| 100 | + */ | ||
| 101 | +@property (assign, readonly, nonatomic) CGRect maskRect; | ||
| 102 | + | ||
| 103 | +/** | ||
| 104 | + The path of the mask. | ||
| 105 | + | ||
| 106 | + @discussion Updating each time before the crop view lays out its subviews. | ||
| 107 | + */ | ||
| 108 | +@property (strong, readonly, nonatomic) UIBezierPath *maskPath; | ||
| 109 | + | ||
| 110 | +/// ----------------------------------- | ||
| 111 | +/// @name Accessing the Crop Attributes | ||
| 112 | +/// ----------------------------------- | ||
| 113 | + | ||
| 114 | +/** | ||
| 115 | + The mode for cropping. Default value is `RSKImageCropModeCircle`. | ||
| 116 | + */ | ||
| 117 | +@property (assign, nonatomic) RSKImageCropMode cropMode; | ||
| 118 | + | ||
| 119 | +/** | ||
| 120 | + The crop rectangle. | ||
| 121 | + | ||
| 122 | + @discussion The value is calculated at run time. | ||
| 123 | + */ | ||
| 124 | +@property (readonly, nonatomic) CGRect cropRect; | ||
| 125 | + | ||
| 126 | +/** | ||
| 127 | + A value that specifies the current rotation angle of the image in radians. | ||
| 128 | + | ||
| 129 | +@discussion The value is calculated at run time. | ||
| 130 | + */ | ||
| 131 | +@property (readonly, nonatomic) CGFloat rotationAngle; | ||
| 132 | + | ||
| 133 | +/** | ||
| 134 | + A floating-point value that specifies the current scale factor applied to the image. | ||
| 135 | + | ||
| 136 | + @discussion The value is calculated at run time. | ||
| 137 | + */ | ||
| 138 | +@property (readonly, nonatomic) CGFloat zoomScale; | ||
| 139 | + | ||
| 140 | +/** | ||
| 141 | + A Boolean value that determines whether the image will always fill the mask space. Default value is `NO`. | ||
| 142 | + */ | ||
| 143 | +@property (assign, nonatomic) BOOL avoidEmptySpaceAroundImage; | ||
| 144 | + | ||
| 145 | +/** | ||
| 146 | + A Boolean value that determines whether the mask applies to the image after cropping. Default value is `NO`. | ||
| 147 | + */ | ||
| 148 | +@property (assign, nonatomic) BOOL applyMaskToCroppedImage; | ||
| 149 | + | ||
| 150 | +/** | ||
| 151 | + A Boolean value that controls whether the rotaion gesture is enabled. Default value is `NO`. | ||
| 152 | + | ||
| 153 | + @discussion To support the rotation when `cropMode` is `RSKImageCropModeCustom` you must implement the data source method `imageCropViewControllerCustomMovementRect:`. | ||
| 154 | + */ | ||
| 155 | +@property (assign, getter=isRotationEnabled, nonatomic) BOOL rotationEnabled; | ||
| 156 | + | ||
| 157 | +/// ------------------------------- | ||
| 158 | +/// @name Accessing the UI Elements | ||
| 159 | +/// ------------------------------- | ||
| 160 | + | ||
| 161 | +/** | ||
| 162 | + The Title Label. | ||
| 163 | + */ | ||
| 164 | +@property (strong, nonatomic, readonly) UILabel *moveAndScaleLabel; | ||
| 165 | + | ||
| 166 | +/** | ||
| 167 | + The Cancel Button. | ||
| 168 | + */ | ||
| 169 | +@property (strong, nonatomic, readonly) UIButton *cancelButton; | ||
| 170 | + | ||
| 171 | +/** | ||
| 172 | + The Choose Button. | ||
| 173 | + */ | ||
| 174 | +@property (strong, nonatomic, readonly) UIButton *chooseButton; | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | +@property(nonatomic,strong) NSString *mTipsStr; | ||
| 179 | + | ||
| 180 | +/// ------------------------------------------- | ||
| 181 | +/// @name Checking of the Interface Orientation | ||
| 182 | +/// ------------------------------------------- | ||
| 183 | + | ||
| 184 | +/** | ||
| 185 | + Returns a Boolean value indicating whether the user interface is currently presented in a portrait orientation. | ||
| 186 | + | ||
| 187 | + @return YES if the interface orientation is portrait, otherwise returns NO. | ||
| 188 | + */ | ||
| 189 | +- (BOOL)isPortraitInterfaceOrientation; | ||
| 190 | + | ||
| 191 | +@end | ||
| 192 | + | ||
| 193 | +/** | ||
| 194 | + The `RSKImageCropVCDataSource` protocol is adopted by an object that provides a custom rect and a custom path for the mask. | ||
| 195 | + */ | ||
| 196 | +@protocol RSKImageCropVCDataSource <NSObject> | ||
| 197 | + | ||
| 198 | +/** | ||
| 199 | + Asks the data source a custom rect for the mask. | ||
| 200 | + | ||
| 201 | + @param controller The crop view controller object to whom a rect is provided. | ||
| 202 | + | ||
| 203 | + @return A custom rect for the mask. | ||
| 204 | + | ||
| 205 | + @discussion Only valid if `cropMode` is `RSKImageCropModeCustom`. | ||
| 206 | + */ | ||
| 207 | +- (CGRect)imageCropViewControllerCustomMaskRect:(RSKImageCropVC *)controller; | ||
| 208 | + | ||
| 209 | +/** | ||
| 210 | + Asks the data source a custom path for the mask. | ||
| 211 | + | ||
| 212 | + @param controller The crop view controller object to whom a path is provided. | ||
| 213 | + | ||
| 214 | + @return A custom path for the mask. | ||
| 215 | + | ||
| 216 | + @discussion Only valid if `cropMode` is `RSKImageCropModeCustom`. | ||
| 217 | + */ | ||
| 218 | +- (UIBezierPath *)imageCropViewControllerCustomMaskPath:(RSKImageCropVC *)controller; | ||
| 219 | + | ||
| 220 | +@optional | ||
| 221 | + | ||
| 222 | +/** | ||
| 223 | + Asks the data source a custom rect in which the image can be moved. | ||
| 224 | + | ||
| 225 | + @param controller The crop view controller object to whom a rect is provided. | ||
| 226 | + | ||
| 227 | + @return A custom rect in which the image can be moved. | ||
| 228 | + | ||
| 229 | + @discussion Only valid if `cropMode` is `RSKImageCropModeCustom`. If you want to support the rotation when `cropMode` is `RSKImageCropModeCustom` you must implement it. Will be marked as `required` in version `2.0.0`. | ||
| 230 | + */ | ||
| 231 | +- (CGRect)imageCropViewControllerCustomMovementRect:(RSKImageCropVC *)controller; | ||
| 232 | + | ||
| 233 | +@end | ||
| 234 | + | ||
| 235 | +/** | ||
| 236 | + The `RSKImageCropVCDelegate` protocol defines messages sent to a image crop view controller delegate when crop image was canceled or the original image was cropped. | ||
| 237 | + */ | ||
| 238 | +@protocol RSKImageCropVCDelegate <NSObject> | ||
| 239 | + | ||
| 240 | +@optional | ||
| 241 | + | ||
| 242 | +/** | ||
| 243 | + Tells the delegate that crop image has been canceled. | ||
| 244 | + */ | ||
| 245 | +- (void)imageCropViewControllerDidCancelCrop:(RSKImageCropVC *)controller; | ||
| 246 | + | ||
| 247 | +/** | ||
| 248 | + Tells the delegate that the original image will be cropped. | ||
| 249 | + */ | ||
| 250 | +- (void)imageCropViewController:(RSKImageCropVC *)controller willCropImage:(UIImage *)originalImage; | ||
| 251 | + | ||
| 252 | +/** | ||
| 253 | + Tells the delegate that the original image has been cropped. Additionally provides a crop rect used to produce image. | ||
| 254 | + */ | ||
| 255 | +- (void)imageCropViewController:(RSKImageCropVC *)controller didCropImage:(UIImage *)croppedImage usingCropRect:(CGRect)cropRect; | ||
| 256 | + | ||
| 257 | +/** | ||
| 258 | + Tells the delegate that the original image has been cropped. Additionally provides a crop rect and a rotation angle used to produce image. | ||
| 259 | + */ | ||
| 260 | +- (void)imageCropViewController:(RSKImageCropVC *)controller didCropImage:(UIImage *)croppedImage usingCropRect:(CGRect)cropRect rotationAngle:(CGFloat)rotationAngle; | ||
| 261 | + | ||
| 262 | +@end |
| 1 | +// | ||
| 2 | +// RSKImageCropVC+Protected.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2014-present Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + The methods in the RSKImageCropVCProtectedMethods category | ||
| 27 | + typically should only be called by subclasses which are implementing new | ||
| 28 | + image crop view controllers. They may be overridden but must call super. | ||
| 29 | + */ | ||
| 30 | +@interface RSKImageCropVC (RSKImageCropVCProtectedMethods) | ||
| 31 | + | ||
| 32 | +/** | ||
| 33 | + Asynchronously crops the original image in accordance with the current settings and tells the delegate that the original image will be / has been cropped. | ||
| 34 | + */ | ||
| 35 | +- (void)cropImage; | ||
| 36 | + | ||
| 37 | +/** | ||
| 38 | + Tells the delegate that the crop has been canceled. | ||
| 39 | + */ | ||
| 40 | +- (void)cancelCrop; | ||
| 41 | + | ||
| 42 | +/** | ||
| 43 | + Resets the rotation angle, the position and the zoom scale of the original image to the default values. | ||
| 44 | + | ||
| 45 | + @param animated Set this value to YES to animate the reset. | ||
| 46 | + */ | ||
| 47 | +- (void)reset:(BOOL)animated; | ||
| 48 | + | ||
| 49 | +@end |
| 1 | +// | ||
| 2 | +// HHCameraImage.h | ||
| 3 | +// camera_Demo | ||
| 4 | +// | ||
| 5 | +// Created by shmily on 15/10/20. | ||
| 6 | +// Copyright © 2015年 shmilyAshen. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import <UIKit/UIKit.h> | ||
| 11 | + | ||
| 12 | +@interface SDKCameraImageModel : NSObject | ||
| 13 | + | ||
| 14 | +/// 全尺寸图像 | ||
| 15 | +@property(nonatomic,strong)NSString *fullPath; | ||
| 16 | + | ||
| 17 | +@property(nonatomic,strong)NSString *scalledPath; | ||
| 18 | + | ||
| 19 | ++ (instancetype)cameraImageWithFullPath:(NSString *)fullPath scalledPath:(NSString *)scalledPath; | ||
| 20 | + | ||
| 21 | +- (bool)isMp4; | ||
| 22 | + | ||
| 23 | + | ||
| 24 | +@end |
| 1 | +// | ||
| 2 | +// SDKCameraUtil.h | ||
| 3 | +// CameraLibrary | ||
| 4 | +// | ||
| 5 | +// Created by shmily on 16/5/25. | ||
| 6 | +// Copyright © 2016年 HHPacs. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <Foundation/Foundation.h> | ||
| 10 | +#import <UIKit/UIKit.h> | ||
| 11 | + | ||
| 12 | +// 图片是否压缩临界点 | ||
| 13 | +#define HHImgReduceSize 1000000 | ||
| 14 | + | ||
| 15 | +@class AVAssetExportSession; | ||
| 16 | + | ||
| 17 | +typedef enum : NSUInteger { | ||
| 18 | + ProTypePacs, | ||
| 19 | + ProTypeUser | ||
| 20 | +} ProType; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +@interface SDKCameraUtil : NSObject | ||
| 24 | + | ||
| 25 | +/// 是否应该被压缩 | ||
| 26 | +@property(nonatomic,assign)BOOL shouldReduce; | ||
| 27 | + | ||
| 28 | +/// 家庭医生使用 | ||
| 29 | +@property(nonatomic, assign)ProType type; | ||
| 30 | + | ||
| 31 | +/// 单例 | ||
| 32 | ++ (instancetype)shareInstance; | ||
| 33 | + | ||
| 34 | +/// 获取图片bundle | ||
| 35 | +//+ (NSBundle *)getBundle; | ||
| 36 | + | ||
| 37 | +/// 根据图片名获取图片 | ||
| 38 | +//+ (UIImage *)getImage:(NSString *)imgName; | ||
| 39 | + | ||
| 40 | +/// 获取视频的缩略图 | ||
| 41 | +/// @param videoURL 视频的URL | ||
| 42 | +/// @param time 截图时间 | ||
| 43 | ++ (UIImage *)thumbnailImageForVideo:(NSURL *)videoURL atTime:(NSTimeInterval)time; | ||
| 44 | + | ||
| 45 | +/// 根据视频路径获取对应缩略图 | ||
| 46 | +//+ (UIImage *)thumImageForVideo:(NSString *)videoPath; | ||
| 47 | + | ||
| 48 | +/// 能否被压缩(小于200k不被压缩) | ||
| 49 | ++ (BOOL)isCanReduce:(UIImage *)image; | ||
| 50 | + | ||
| 51 | ++ (BOOL)isCanReduceFile:(NSString *)imgPath; | ||
| 52 | + | ||
| 53 | +/// 压缩图像后覆盖原图 | ||
| 54 | ++ (BOOL)reduceImage:(UIImage *)img path:(NSString *)path; | ||
| 55 | + | ||
| 56 | ++ (BOOL)isImage:(NSString *)path; | ||
| 57 | + | ||
| 58 | +/// 创建图片的本地路径 | ||
| 59 | +/// | ||
| 60 | +/// @param prefix 文件头 | ||
| 61 | ++ (NSString *)createDocumentPath:(NSString *)prefix; | ||
| 62 | + | ||
| 63 | +// 获取图片(视频)缩略图路径 | ||
| 64 | ++ (NSString *)getScallPath:(NSString *)fullPath; | ||
| 65 | + | ||
| 66 | +/// 写入文件 | ||
| 67 | ++ (NSString *)writeImageToFile:(UIImage *)image; | ||
| 68 | + | ||
| 69 | ++ (NSString *)writeImageToFile:(UIImage *)image scale:(CGSize)size fullPath:(NSString *)fullPath; | ||
| 70 | + | ||
| 71 | ++ (NSString *)writeScaledImg:(UIImage *)image scale:(CGSize)size fullPath:(NSString *)fullPath; | ||
| 72 | + | ||
| 73 | +/// 压缩图片 | ||
| 74 | ++ (void)zipImages:(NSArray<NSString *> *)imgPaths; | ||
| 75 | + | ||
| 76 | ++ (UIImage *)fixOrientation:(UIImage *)aImag; | ||
| 77 | + | ||
| 78 | ++ (void)videoFixOrientation: (NSURL *)url path:(NSString *)path finished:(void (^)(AVAssetExportSession *))finishBlock; | ||
| 79 | + | ||
| 80 | ++ (Boolean)isIPad; | ||
| 81 | + | ||
| 82 | +@end |
| 1 | +// | ||
| 2 | +// RSKImageCropper.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2014-present Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + `RSKImageCropper` is an image cropper for iOS like in the Contacts app with support for landscape orientation. | ||
| 27 | + */ | ||
| 28 | + | ||
| 29 | +#import "RSKImageCropVC.h" |
| 1 | +/* | ||
| 2 | + File: SDKImageScrollView.h | ||
| 3 | + Abstract: Centers image within the scroll view and configures image sizing and display. | ||
| 4 | + Version: 1.3 modified by Ruslan Skorb on 8/24/14. | ||
| 5 | + | ||
| 6 | + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | ||
| 7 | + Inc. ("Apple") in consideration of your agreement to the following | ||
| 8 | + terms, and your use, installation, modification or redistribution of | ||
| 9 | + this Apple software constitutes acceptance of these terms. If you do | ||
| 10 | + not agree with these terms, please do not use, install, modify or | ||
| 11 | + redistribute this Apple software. | ||
| 12 | + | ||
| 13 | + In consideration of your agreement to abide by the following terms, and | ||
| 14 | + subject to these terms, Apple grants you a personal, non-exclusive | ||
| 15 | + license, under Apple's copyrights in this original Apple software (the | ||
| 16 | + "Apple Software"), to use, reproduce, modify and redistribute the Apple | ||
| 17 | + Software, with or without modifications, in source and/or binary forms; | ||
| 18 | + provided that if you redistribute the Apple Software in its entirety and | ||
| 19 | + without modifications, you must retain this notice and the following | ||
| 20 | + text and disclaimers in all such redistributions of the Apple Software. | ||
| 21 | + Neither the name, trademarks, service marks or logos of Apple Inc. may | ||
| 22 | + be used to endorse or promote products derived from the Apple Software | ||
| 23 | + without specific prior written permission from Apple. Except as | ||
| 24 | + expressly stated in this notice, no other rights or licenses, express or | ||
| 25 | + implied, are granted by Apple herein, including but not limited to any | ||
| 26 | + patent rights that may be infringed by your derivative works or by other | ||
| 27 | + works in which the Apple Software may be incorporated. | ||
| 28 | + | ||
| 29 | + The Apple Software is provided by Apple on an "AS IS" basis. APPLE | ||
| 30 | + MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION | ||
| 31 | + THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS | ||
| 32 | + FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND | ||
| 33 | + OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. | ||
| 34 | + | ||
| 35 | + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL | ||
| 36 | + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 37 | + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 38 | + INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, | ||
| 39 | + MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED | ||
| 40 | + AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), | ||
| 41 | + STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE | ||
| 42 | + POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | + | ||
| 44 | + Copyright (C) 2012 Apple Inc. All Rights Reserved. | ||
| 45 | + | ||
| 46 | + */ | ||
| 47 | + | ||
| 48 | +#import <UIKit/UIKit.h> | ||
| 49 | + | ||
| 50 | +@interface SDKImageScrollView : UIScrollView | ||
| 51 | + | ||
| 52 | +@property (nonatomic, strong) UIImageView *zoomView; | ||
| 53 | +@property (nonatomic, assign) BOOL aspectFill; | ||
| 54 | + | ||
| 55 | +- (void)displayImage:(UIImage *)image; | ||
| 56 | + | ||
| 57 | +@end |
| 1 | +// | ||
| 2 | +// SDKPHAssetManager.h | ||
| 3 | +// CameraLibrary | ||
| 4 | +// | ||
| 5 | +// Created by shmily on 16/3/16. | ||
| 6 | +// Copyright © 2016年 HHPacs. All rights reserved. | ||
| 7 | +// | ||
| 8 | + | ||
| 9 | +#import <UIKit/UIKit.h> | ||
| 10 | +#import <Photos/Photos.h> | ||
| 11 | + | ||
| 12 | +@interface SDKPHAssetManager : NSObject | ||
| 13 | + | ||
| 14 | +- (void)tranformImage:(PHAsset *)asset finished:(void (^)(NSData *fullData,NSData *scaledData))finishBlock; | ||
| 15 | + | ||
| 16 | +// 返回填充的缩略图 | ||
| 17 | ++ (UIImage *)image:(UIImage *)image fillSize: (CGSize)viewsize; | ||
| 18 | + | ||
| 19 | ++ (NSString*)createFilePath:(NSString *)aFileName; | ||
| 20 | + | ||
| 21 | +/// 是否有缓存 | ||
| 22 | ++ (BOOL)isWriteCache:(NSString *)aPath setData:(NSData *)aData; | ||
| 23 | + | ||
| 24 | ++ (instancetype)shareManager; | ||
| 25 | + | ||
| 26 | +@end |
| 1 | +// | ||
| 2 | +// SDKTouchView.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2014-present Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +#import <UIKit/UIKit.h> | ||
| 26 | + | ||
| 27 | +@interface SDKTouchView : UIView | ||
| 28 | + | ||
| 29 | +@property (weak, nonatomic) UIView *receiver; | ||
| 30 | + | ||
| 31 | +@end |
| 1 | +// | ||
| 2 | +// UIApplication+RSKImageCropper.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2015 Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +#import <UIKit/UIKit.h> | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + The category `RSKImageCropper` of the class `UIApplication` provides the method `rsk_sharedApplication` which returns `nil` in an application extension, otherwise it returns the singleton app instance. | ||
| 29 | + */ | ||
| 30 | +@interface UIApplication (RSKImageCropper2) | ||
| 31 | + | ||
| 32 | +/** | ||
| 33 | + Returns `nil` in an application extension, otherwise returns the singleton app instance. | ||
| 34 | + | ||
| 35 | + @return `nil` in an application extension, otherwise the app instance is created in the `UIApplicationMain` function. | ||
| 36 | + */ | ||
| 37 | ++ (UIApplication *)rsk_sharedApplication; | ||
| 38 | + | ||
| 39 | +@end |
| 1 | +// | ||
| 2 | +// UIImage+RSKImageCropper.h | ||
| 3 | +// | ||
| 4 | +// Copyright (c) 2014-present Ruslan Skorb, http://ruslanskorb.com/ | ||
| 5 | +// | ||
| 6 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 7 | +// of this software and associated documentation files (the "Software"), to deal | ||
| 8 | +// in the Software without restriction, including without limitation the rights | ||
| 9 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 10 | +// copies of the Software, and to permit persons to whom the Software is | ||
| 11 | +// furnished to do so, subject to the following conditions: | ||
| 12 | +// | ||
| 13 | +// The above copyright notice and this permission notice shall be included in | ||
| 14 | +// all copies or substantial portions of the Software. | ||
| 15 | +// | ||
| 16 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 17 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 18 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 19 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 20 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 21 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 22 | +// THE SOFTWARE. | ||
| 23 | +// | ||
| 24 | + | ||
| 25 | +#import <UIKit/UIKit.h> | ||
| 26 | + | ||
| 27 | +@interface UIImage (RSKImageCropper2) | ||
| 28 | + | ||
| 29 | +// Fix the orientation of the image. | ||
| 30 | +- (UIImage *)fixOrientation; | ||
| 31 | + | ||
| 32 | +// Rotate the image clockwise around the center by the angle, in radians. | ||
| 33 | +- (UIImage *)rotateByAngle:(CGFloat)angleInRadians; | ||
| 34 | + | ||
| 35 | +@end |
4.25 KB
4.43 KB
2.21 KB
3.76 KB
2.35 KB
2.27 KB
3.27 KB
3.31 KB
788 Bytes
2.28 KB
3.88 KB
3.23 KB
5.47 KB
2.29 KB
3.92 KB
2.9 KB
4.81 KB
2.28 KB
3.87 KB
1.13 KB
1.8 KB
HHIMSDK/HHIMSDK.framework/Info.plist
0 → 100644
No preview for this file type
HHIMSDK/HHIMSDK.framework/Modules/HHIMSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
0 → 100644
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
HHIMSDK/HHIMSDK.framework/Modules/HHIMSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc
0 → 100644
No preview for this file type
HHIMSDK/HHIMSDK.framework/Modules/HHIMSDK.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
0 → 100644
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment