Questions tagged [cs193p]

CS193P is an iOS programming course offered at Stanford University. The latest Fall 2017 session videos, lecture slides and assignments are available on iTunes U, and have become a popular way of learning to program for the platform.

CS193P is an iOS () programming course offered at Stanford University. The latest Fall 2017 session videos, lecture slides, and assignments focus on iOS 11 and Swift 4 () and are available on iTunes U. This course has become a popular way of learning to program for the platform.

References:

173 questions
4
votes
1 answer

What's the difference between downloadtaskwithrequest and downloadtaskwithurl

I'm watching the Stanford CS193p lecture video. The instructor used both downloadTaskWithRequest: and downloadTaskWithURL: when downloading some photos from Flickr. I'm a bit confused. I looked up the former in the documentation, which speaks of…
4
votes
1 answer

UIActivityIndicatorView Never Animates

I have a PhotoViewController class with an @property UIActivityIndicatorView* spinner. FlickrPhotoViewController is a subclass of PhotoViewController that downloads a photo from Flickr and tells the spinner when to start and stop animating. …
Xander Dunn
  • 2,349
  • 2
  • 20
  • 32
4
votes
2 answers

Stanford iphone development -CS193P Assignment 1 - "sin" operation

one of the required work is to implement the "sin" button on the calculator Add the following 4 operation buttons: • sin : calculates the sine of the top operand on the stack. here is my code - (double)performOperation:(NSString *)operation { …
Kuo-lun
  • 65
  • 1
  • 7
3
votes
6 answers

How do I align a button under a label in Xcode 6?

I'm watching Stanford's cs193p lectures with iTunes U and the first demo has been a calculator. In the second lecture, the professor aligns the buttons with the bottom edge of the display label using a black grid line that appears. How do I enable…
halecommarachel
  • 124
  • 1
  • 9
3
votes
1 answer

Accessing Array of View Controllers on Stack in Swift

Basically I'm trying to do this in Swift // get the Detail view controller in our UISplitViewController (nil if not in one) id detail = self.splitViewController.viewControllers[1]; // if Detail is a UINavigationController, look at its root view…
Sawyer05
  • 1,604
  • 2
  • 22
  • 37
3
votes
1 answer

NSdata writeToURL not working

i'm trying to save a NsData file into a directory. that is the code of my method: - (void)cacheImage:(NSData *)imageData withTitle:(NSString *)title { NSURL *cacheURL = (NSURL *)[[self.fileMenager URLsForDirectory:NSCachesDirectory…
Max_Power89
  • 1,710
  • 1
  • 21
  • 38
3
votes
3 answers

How am I leaking memory?

I have a table view that when loading creates a person object Person.h #import #import "TwitterHelper.h" @interface Person : NSObject { NSDictionary *userInfo; NSURL *image; NSString *userName; NSString…
Jason
  • 17,276
  • 23
  • 73
  • 114
2
votes
6 answers

CS193P - Adding cancel button to iOS calculator

I recently started following the online course on iPhone development from Stanford University on iTunes U. I'm trying to do the homework assignments now for the first couple of lectures. I followed through the walkthrough where I built a basic…
lakshmen
  • 28,346
  • 66
  • 178
  • 276
2
votes
4 answers

Stanford CS193p Assignment 2 - Entering variables into RPN calculator

I am currently teaching myself iPhone programming and working on solving assignment 2 [PDF] of this year Stanford CS193p course. There's something I don't understand about Required Task 1. One is supposed to add variable support to RPN calculator…
user1044147
  • 108
  • 1
  • 6
2
votes
0 answers

Is there a support community around Stanford's "CS 193P iPhone Application Development" anywhere on the web?

Searching Google brought me here: https://stackoverflow.com/questions/1155220/are-the-solutions-to-stanfords-online-iphone-development-course-anywhere-on-the Searching "193p" on Stackoverflow.com did spit out a bunch of results, but they're all…
2
votes
2 answers

Forcing a View to the bottom right of View in SwiftUI

I'm teaching myself SwiftUI by taking the 2020 version of Stanford's CS193p posted on YouTube. I'd like to have a ZStack with a check box in the bottom right. This code puts the check mark right in the middle of the View. ZStack { .... stuff…
Frank Yellin
  • 9,127
  • 1
  • 12
  • 22
2
votes
1 answer

Can't Infer Generic Type 'S' in SwiftUI 'Text' in CS193p project, in Xcode

Background I am following Stanfords' CS193p iOS Development online course. I am with Xcode 11.3 and Swift 5.1.2. Problem By the end of lecture 5. ViewBuilder + Shape + ViewModifier, an error occurred to me, which is the Swift compiler reported…
ht.lee
  • 23
  • 5
2
votes
0 answers

Setting and changing width/height of UICollectionView cells with UICollectionViewLayout

I'm using drag and drop to drag images from google onto a collection view. The images are all supposed to have equal widths. After I scroll a bit, some of the cells look like they have equal widths, but some images are too big. The collectionView…
Sam
  • 1,765
  • 11
  • 82
  • 176
2
votes
3 answers

How can I make my calculator add a Period in swift?

Here is the code for my UIButton @IBAction private func performOperation(sender: UIButton) { if userIsInTheMiddleOfTyping { brain.setOperand(displayValue) userIsInTheMiddleOfTyping = false } if let mathematicalSymbol =…
software is fun
  • 7,286
  • 18
  • 71
  • 129
2
votes
4 answers

Passing object from controller to a view

I'm following iPhone dev courses from Stanford Open-University, and I've been blocked for 2 days on assignment3, maybe someone can help me here? The tasks are: Create a custom UIView subclass that will display your PolygonShape object Give your…
Alex
  • 26,406
  • 5
  • 30
  • 36
1
2
3
11 12