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
action ... | |
Specify one or more actions to perform. Available actions are: | |
build Build the target in the build root (SYMROOT). This is the default action, and is used if no action is given. | |
build-for-testing Build the target and associated tests in the build root (SYMROOT). This will also produce an xctestrun file in | |
the build root. This requires specifying a scheme. | |
analyze Build and analyze a target or scheme from the build root (SYMROOT). This requires specifying a scheme. |
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
https://stackoverflow.com/a/52825714/3374327 | |
Assuming your MyProject.xcodeproj is in your working directory, and all your sources are in or below your working directory, you could use a hack* like this to look for .m files that are not part of any target: | |
find . -name "*.m" -exec basename '{}' \; | xargs -I '{}' sh -c 'grep "{} in Sources" MyProject.xcodeproj/project.pbxproj > /dev/null; echo "$?\c"; echo " {}"' | grep "^1" | |
Once you remove the files from the project, you can remove them -- and other objc source files that are no longer referenced from your project -- from your git repo using this similar script: | |
find . -name "*.[hm]" -exec basename '{}' \; | xargs -I '{}' sh -c 'grep {} MyProject.xcodeproj/project.pbxproj > /dev/null; echo "$?\c"; echo " {}"' | grep "^1" | cut -c3- | xargs -I '%' find . -name '%' -exec git rm '{}' \; | |
* hack in the sense that it depends on implementation details of the Xcode file 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
#source ~/.bash_profile | |
export FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=120 | |
export TERM=xterm-256color | |
export LANG=en_US.UTF-8 | |
export LANGUAGE=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
bundle install | |
bundle exec pod install --repo-update |
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
1... Why is UIScrollView leaving space on top | |
With Storyboard- Goto view controller > Attribute Inspector > Uncheck Adjust Scroll View Insets property | |
With Code- For extra space set viewController property automaticallyAdjustsScrollViewInsets to NO, by default it is YES. | |
self.automaticallyAdjustsScrollViewInsets = false; | |
scroller.contentInset = UIEdgeInsetsZero; | |
scroller.scrollIndicatorInsets = UIEdgeInsetsZero; | |
scroller.contentOffset = CGPointMake(0.0, 0.0); |
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
let binder: (Observable<Bool>) -> Disposable = { obs in | |
return obs.bind(to: self.tableView.rx.printing) | |
} | |
let bindCurry: (Observable<Bool>) -> (Binder<Bool>) -> Observable<Bool> = { obs in | |
return { binder in | |
obs.bind(to: binder).disposed(by: self.disposeBag) | |
return obs | |
} | |
} |
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 Cocoa | |
struct Person { | |
var name: String = "John" | |
var age: Int = 50 | |
var dutch: Bool = false | |
var address: Address? = Address(street: "Market St.") | |
} | |
struct Address { |
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
//캐릭터 변경, 넽 변경 에 따른 홈-전체 리로드 | |
guard let reachabilityObservable = try? DefaultReachabilityService.shared().reachability.asObservable() else { | |
return | |
} | |
Observable.combineLatest(UserDataManager.shared.currentCharacter, reachabilityObservable, viewModel.currentTabEditEvent.startWith(nil)) | |
.distinctUntilChanged({ (lhs, rhs) -> Bool in | |
return lhs.2 != rhs.2 || lhs.1.reachable != rhs.1.reachable || lhs.0 != rhs.0 | |
}) | |
.map { [weak self] args -> (CharacterType?, ReachabilityStatus, RxTimeInterval) in |
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
.flatMapFirst { args -> Observable<(CharacterType?, ReachabilityStatus)> in | |
let delay = self.editSection == nil ? 0 : 0.75 | |
return Observable.just(args).delaySubscription(RxTimeInterval(delay), scheduler: MainScheduler.instance) | |
} |
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
func scrollFromDragging() {//need pageEnabled. | |
guard let scrollView = self.collectionView else { return } | |
var index = Int((scrollView.contentOffset.x) / (scrollView.frame.width)) | |
guard currentIndex != index, let banners = banners, rolling == false, isDragging == true else { | |
return | |
} | |
var condition = currentIndex < 0 ? 0 : 3 | |
condition = index == 0 && currentIndex >= 0 ? 1 : condition |
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
dataSource.dataReloaded | |
.filter { [dataSource, tableView] in dataSource?.sectionModels.first?.items.isEmpty == false && tableView?.isEditing == false} | |
.debug(">>>>>>>>>>> CFGetRetainCount >> \(CFGetRetainCount(self))") | |
.emit(onNext: { [weak self] _ in | |
guard let self = self, let items = self.dataSource.sectionModels.first?.items else { return } | |
if self.viewModel.currentPage.page == 1, items.count <= 50 {//라이크 이벤트 발생 시 최상위로 이동 | |
self.needScrollToTop = false | |
self.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: UITableViewScrollPosition.top, animated: false) | |
} | |
}) |