職位:全職(Remote)
- 職務: iOS Developer
責任:協助我們打造東南亞及亞太地區最棒的新聞應用程式!
| //=====(1)===== | |
| @interface ViewController ()<UITableViewDataSource,UITableViewDelegate> | |
| { | |
| UINib * nib; | |
| } | |
| @end | |
| -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ | |
| if (nib == nil) { |
| // in self class -> MyVC | |
| myBtn.addTarget(self, action: .selfSelector, forControlEvents: .TouchUpInside) | |
| // in singleton class -> mainVC | |
| mainVCBtn.addTarget(SingletonClass.shared().mainVC, action: .addTopicSelector, forControlEvents: .TouchUpInside) | |
| private extension Selector { | |
| static let selfSelector = #selector(MyVC.btnDidPressed(_:)) | |
| static let addTopicSelector = #selector(SingletonClass.shared().mainVC.newTopicBtnPressed(_:)) |
| CGPoint center= sender.center; | |
| CGPoint rootViewPoint = [sender.superview convertPoint:center toView:self.myTableView]; | |
| NSIndexPath *indexPath = [self.myTableView indexPathForRowAtPoint:rootViewPoint]; |
| tell application "Xcode" | |
| activate | |
| end tell | |
| delay 1 | |
| tell application "System Events" | |
| tell process "Xcode" | |
| tell menu bar 1 | |
| tell menu bar item 10 | |
| tell menu 1 | |
| tell menu item 12 |
| desc "Deploy a new version to the App Store" | |
| lane :release do | |
| # 1.Creating Certificates and Provisioning Profiles | |
| cert | |
| sigh(force: true) | |
| # 2. | |
| #ensure_git_status_clean | |
| # 3.Creating the IPA file |
| sudo su | |
| apt-get update | |
| apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install htop -y | |
| apt-get install unattended-upgrades -y && dpkg-reconfigure -plow unattended-upgrades | |
| apt-get install ntp -y && ntpq -p && service ntp restart | |
| reboot |
| eval "$(curl -sL https://apt.vapor.sh)" | |
| sudo apt-get install swift vapor | |
| sudo apt-get install libpq-devcd |
| server { | |
| server_name YOUR_DOMAIN_NAME; | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| root /home/YOUR_VAPOR_FOLDER_PATH/Public; | |
| index index.html; | |
| try_files $uri @proxy; | |
| location @proxy { |
| [program:APP_NAME] | |
| command=vapor run --env=production | |
| directory=/home/USER_NAME/YOUR_APP/ # Put correct path here | |
| autorestart=true | |
| user=USER_NAME # Put username here | |
| stdout_logfile=/var/log/supervisor/%(program_name)-stdout.log | |
| stderr_logfile=/var/log/supervisor/%(program_name)-stderr.log |