This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="bs-tiny-widget"></div> | |
| <script> | |
| (function(d){ | |
| var w,c=d.createElement('script'),s=d.createElement('link'); | |
| c.src='https://bolshayastrana.com/jswidget/tiny/bundle.js';c.type='text/javascript';c.async=!0;c.defer=!0;d.body.appendChild(c); | |
| s.rel='stylesheet';s.href='https://bolshayastrana.com/jswidget/tiny/bundle.css';d.getElementsByTagName('head')[0].appendChild(s); | |
| c.onload=function(){ | |
| w = new BsTinyWidget({ | |
| target: d.getElementById('bs-tiny-widget'), | |
| props: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "UICollectionViewFlowLayoutCenterItem.h" | |
| @implementation UICollectionViewFlowLayoutCenterItem | |
| - (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity | |
| { | |
| CGSize collectionViewSize = self.collectionView.bounds.size; | |
| CGFloat proposedContentOffsetCenterX = proposedContentOffset.x + self.collectionView.bounds.size.width * 0.5f; | |
| CGRect proposedRect = self.collectionView.bounds; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class EMCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
| override func targetContentOffsetForProposedContentOffset(proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint { | |
| var _proposedContentOffset = CGPoint(x: proposedContentOffset.x, y: proposedContentOffset.y) | |
| var offSetAdjustment: CGFloat = CGFloat.max | |
| let horizontalCenter: CGFloat = CGFloat(proposedContentOffset.x + (self.collectionView!.bounds.size.width / 2.0)) | |
| let targetRect = CGRect(x: proposedContentOffset.x, y: 0.0, width: self.collectionView!.bounds.size.width, height: self.collectionView!.bounds.size.height) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*----------------------------------------------------*/ | |
| #pragma mark - XCTAsserts | |
| /*----------------------------------------------------*/ | |
| XCTAssert(expression, format...); | |
| XCTAssertTrue(expression, format...); | |
| XCTAssertFalse(expression, format...); | |
| XCTAssertEqual(expression1, expression2, format...); | |
| XCTAssertNotEqual(expression1, expression2, format...); | |
| XCTAssertNil(expression, format...); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> | |
| // Compile-time selector checks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CGFloat scale = 1.0f; | |
| if ([UIScreen instancesRespondToSelector:@selector(scale)) { | |
| scale = [UIScreen mainScreen].scale; | |
| } | |
| CGDataProviderRef source = CGDataProviderCreateWithData(NULL, ThumbnailSample_2x_png, ThumbnailSample_2x_png_len, NULL); | |
| CGImageRef imageRef = CGImageCreateWithPNGDataProvider(source, NULL, YES, kCGRenderingIntentDefault); | |
| UIImage *image = [UIImage imageWithCGImage:imageRef scale:scale orientation:UIImageOrientationUp]; | |
| CGImageRelease(imageRef); | |
| CGDataProviderRelease(source); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Declare enums like so: | |
| #define IMAGE_STATUS(XX) \ | |
| XX(kDOImageStatusOK, = 0) \ | |
| XX(kDOImageStatusCached, )\ | |
| XX(kDOImageStatusRetry, ) | |
| DECLARE_ENUM(DOImageStatus, IMAGE_STATUS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Написать простой клиент для Superjob. | |
| Платформы: ios 7+ | |
| Верстка: Storyboard+Autolayout; | |
| Cocoa Pods для сторонних библиотек | |
| Поддержка Autorotation | |
| API URL: https://api.superjob.ru/#methods | |
| app_key: r0709abae5013187334987e274e49a191c9b1d7d7ddefaba5482829ff04546d2c5f5286ba | |
| По вопросам: ody344@gmail.com |