April 12
App Plan
I would like to be able to be able to
1. have a canvas with infinite scroll and pinch to zoom
2. be able to add polygons
3. there will be no coordinate system.
the polygons will be constructed in the following way
There are 8 actions
1. Add poly
3. select poly (select poly changes the color)
3a. add vert at head
3b. del vert at head
3c Hausdorff = select another. simple animation ending with a line drawn between the pair of points determined by Hauss. This line disappears if
3d min hausdorff = select another
3e delete
7. exit mode
(add and delete are hard
other
1. don't care about snap to point
2. don't care about recognizing boxs, rects, etc
Good fundamentals for IOS dev
1. read documentation before asking online
2. watch WWDC videos
Bugs
Tried to create a new class and got the error
"redefinition as a different kind of symbol"
But I changed rect to rectangle and the bug was resolved. I guess there is something in the Foundation namespace.
#
Outstanding issues
I still have not figured out how to do refactoring in Xcode..
#
Started at 9:00
In an hour and 45 mins was only able to implement a single super class...
# 2pm
again
UITableViewDelegate
UITableViewDataSource
NumberOfRowsInSectionc
cellForRowAtIndexPath
these are methods which are part of the UITableViewDataSource protocol
this means that it is mandatory to implement these methods as part of the protocol.
An ObjC thing in the namespace is distinguished by the names of each of its inputs.
So for example we could call a method that takes two inputs X and Y
"X:Y"
#
In java the class file name is forced to be the same as the file name
But this is not required in C...
#
Bug
Was reading the text too quickly. Need to read each line slowly to grasp its meaning.
#
# notes on the text
#
Constraints are visible in Document Outline
There are 4 kinds of constraints
There are a couple of things we need to do
1. we need to switch from UITableViewController over UITableView
So its important to understand that UITableView will work for table display. We just need to implement that protocol
Whenever I'm given a list of protocols in the form <A,B,C,D> to implement it would be good to compare A,B,C,D to see if there are some common words that start the method names.
Unlike Java which would have some define some class for each protocol, in objective C we just use prefixes to designate a particular class.
Chapter 4
Another new project. Single view application.
We call it CustomTable.
We disable size classes by going into the File Inspector
We are going to create a Cocoa Touch Class called CustomTableViewController
#
viewDidLoad method
add some stuff
we are needing to implement two datasource methods
tableView:numberOfRowsInSection
tableView:cellForRowAtIndexPath
there are default implementations. However, they don't usually work good.
In one of them we are going to pass in the number of sections. However, the number of sections here is one.
No comments:
Post a Comment