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
1
vote
1 answer

iOS (cs193p): Why are my UISplitViewControllerDelegate delegate methods not called on orientation change?

I'm following the awesome Stanford cs193p course on iTunes and I'm now at lecture #7 and homework #3. I'm just trying to make the SplitViewController works correctly on iPad... but it looks like my UISplitViewControllerDelegate delegate methods are…
Pascal
  • 85
  • 8
1
vote
1 answer

Objective C: Download Thread not affecting UI, even possible?

I'm working through the Standford course on ItunesU and there they say a thread to download something should not do anything to the UI, this should only happen on the Main Thread. Well, in my example I'm downloading a picture from Flicker and I want…
MichiZH
  • 5,587
  • 12
  • 41
  • 81
1
vote
2 answers

Backspacing a Number in a Calculator App

Can someone explain this code - (IBAction)backspacePressed { self.display.text =[self.display.text substringToIndex: [self.display.text length] - 1]; if ( [self.display.text isEqualToString:@""] || [self.display.text…
user1295568
  • 53
  • 1
  • 2
  • 8
1
vote
2 answers

Using NSRange rangeOfString

Can someone explain what location and length represent for NSRange. If I use it in this context NSRange range = [self.display.text rangeOfString:@"."]; if(range.location == NSNotFound){ self.display.text = [self.display.text…
user1295568
  • 53
  • 1
  • 2
  • 8
1
vote
1 answer

Core Data: use executeFetchRequest in a loop

Regarding one answer in another post: is that use executeFetchRequest in a loop a bad practice? I saw that usage in Stanford CS193p project "Photomania" (click link to download project). The relevant code is below: The [FlickrFetcher…
Philip007
  • 3,190
  • 7
  • 46
  • 71
1
vote
2 answers

Why am I getting a unrecognized selector sent to instance exception with my MapViewController? (iOS)

I'm taking the Stanford iOS class (sorry, I'm one of these guys but gotta learn somehow I guess) and I'm using code that is almost exactly the same as the code that the prof used in the lecture about MKMapViews but I'm getting this exception that he…
Jon Aird
  • 823
  • 1
  • 9
  • 18
1
vote
1 answer

mkmapview delegate method not being called -calloutaccessorycontroltapped

I'm trying to complete the last part of assignment 5 of cs193p (link) The app selects popular places from Flickr and plots photos from those places on the map. It's Task 5c which says Each annotation on the map should have a callout which displays…
Matt
  • 435
  • 5
  • 15
1
vote
1 answer

Passing Objects using Segue

I have trouble understanding segues and how they work and pass objects. Basically I have a calculator and am trying to graph the objects stored in an array. So far I have an object called brain which is an instance of CalculatorBrain. Now brain has…
Terrel Gibson
  • 481
  • 1
  • 6
  • 21
1
vote
1 answer

Stanford iTunes U CS193P Assignment 3, Communication between two ViewControllers

Ok, I know that the model for the new graphing vc is going to be a subclass of the calculator brain, but how do I get the program stack of the CalculatorBrain from the old VC to the GraphingBrain of my new VC? DO I have to go down the stack on the…
1
vote
1 answer

Objective C 'target action' in .m and 'outlet' in .h

I'm currently taking the Stanford CS193p iPhone and iPad application development course ( http://itunes.apple.com/itunes-u/ipad-iphone-application-development/id473757255 ) and in the second lecture I got stumped when he connected the buttons of the…
sean5
  • 11
  • 1
1
vote
1 answer

The delegate error

The thing I want to do is: First, the TopPlacesViewController has a segue to the class SinglePlacePhotosViewController (a TableView controller). I create a delegate in the TopPlacesViewController class, then use the prepareforSegue method to set the…
dsfdf
  • 106
  • 2
  • 7
1
vote
1 answer

When does setter method get called from UIView subclass

I am taking the free Stanford course on iTunesU(193P) and we created setting up a class that is a subclass of UIView and created a public property called scale. The idea was that when we pinch, the scale of the view is changed accordingly but I am…
cspam
  • 2,911
  • 2
  • 23
  • 41
1
vote
4 answers

Newbie IOS Class Method

On assignment 2 of the Stanford CS193P course it states that I must add a runProgram class method with the following signature: + (double)runProgram:(id)program usingVariableValues:(NSDictionary *)variableValues; However I do not recognise or know…
Bugs
  • 21
  • 3
1
vote
3 answers

Do I need to use a delegate to maintain the MVC pattern when accessing NSUserDefaults?

Still on assignment 4 of cs193p. - http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/assignments/Assignment%204_2.pdf I've fully (ish) implemented the displaying photos from a list of places. I'm adding the second tab of the…
Matt
  • 435
  • 5
  • 15
1
vote
2 answers

compiler error preventing iOS project from compiling

I'm doing assignment 4 of cs193p from itunes u (fall 2011 Stanford iOS development course) The assignment is to create a flickr app - they provide a flick helper class called flickrfetcher. I've copied in the flickrfetcher .h & .m files (available…
Matt
  • 435
  • 5
  • 15