Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1020226second #44

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions FizzBuzz/FizzBuzz/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,24 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="FizzBuzz" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LGB-Cl-S8b">
<rect key="frame" x="96.5" y="149" width="221" height="115"/>
<fontDescription key="fontDescription" type="system" pointSize="96"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ztc-8t-NEO">
<rect key="frame" x="52" y="370" width="310" height="156"/>
<color key="backgroundColor" systemColor="systemCyanColor"/>
<color key="tintColor" systemColor="secondarySystemGroupedBackgroundColor"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="カウント">
<fontDescription key="titleFontDescription" type="system" weight="heavy" pointSize="50"/>
</buttonConfiguration>
<connections>
<action selector="countup:" destination="BYZ-38-t0r" eventType="touchUpInside" id="EOC-Vn-ins"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Ztc-8t-NEO" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="HwM-2M-gvN"/>
<constraint firstItem="Ztc-8t-NEO" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="XYB-kp-uPF"/>
<constraint firstItem="LGB-Cl-S8b" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cyo-ia-bPB"/>
</constraints>
</view>
<connections>
<outlet property="input" destination="LGB-Cl-S8b" id="Wjk-Rn-SaR"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="18.840579710144929" y="66.964285714285708"/>
</scene>
</scenes>
<resources>
<systemColor name="secondarySystemGroupedBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemCyanColor">
<color red="0.19607843137254902" green="0.67843137254901964" blue="0.90196078431372551" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
22 changes: 21 additions & 1 deletion FizzBuzz/FizzBuzz/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,31 @@ import UIKit

class ViewController: UIViewController {

@IBOutlet weak var input: UILabel!
var i:Int=0

override func viewDidLoad() {
super.viewDidLoad()
input.text=String(i)
// Do any additional setup after loading the view.
/*
for i in 1...100{
if(i%3==0 && i%5==0){
print("FizzBuzz")
}else if(i%3==0){
print("Fizz")
}else if(i%5==0){
print("Buzz")
}else{
print (i)
}
}*/
}


@IBAction func countup(_ sender: UIButton) {
i=i+1
input.text=String(i)

}
}