- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在创建一个带有状态列表的 UITableView,一旦您在其中一个单元格中选择一个状态,它将切换到下一个 View ,该 View 将具有与该状态相对应的城市列表。到目前为止,这就是我对我的一系列城市的了解:
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
NSMutableArray *mainArray = [[NSMutableArray alloc] init];
self.section1 = @[@"Alabama",@"Alaska",@"Arizona",@"Arkansas",@"California",@"Colorado",@"Connecticut",@"Delaware"];
self.section2 = @[@"Florida",@"Georgia",@"Hawaii",@"Idaho",@"Illinois",@"Indiana",@"Iowa",@"Kansas",@"Kentucky",@"Louisiana"];
self.section3 = @[@"Maine",@"Maryland",@"Massachusetts",@"Michigan",@"Minnesota",@"Mississippi",@"Misouri",@"Montana"];
self.section4 = @[@"Nevada",@"Nebraska",@"New Hampshire",@"New Jersey",@"New Mexico",@"New York",@"North Carolina",@"North Dakota",@"Ohio",@"Ohio",@"Oklahoma",@"Oregon"];
self.section5 = @[@"Pennsylvania",@"Rhode Island",@"South Carolina",@"South Dakota",@"Tennessee",@"Texas",@"Utah"];
self.section6 = @[@"Vermont",@"Virginia",@"Washington",@"West Virginia",@"Wisconsin",@"Wyoming"];
}
return self;
}
self.Alabama = @[@"auburn",
@"birmingham",
@"dothan",
@"florence / muscle shoals",
@"gadsden-anniston",
@"huntsville / decatur",
@"mobile",
@"montgomery",
@"tuscaloosa"];
self.Alaska = @[@"anchorage / mat-su",
@"fairbanks",
@"kenai peninsula",
@"southeast alaska"];
self.Arizona = @[@"flagstaff / sedona",
@"mohave county",
@"phoenix",
@"prescott",
@"show low",
@"sierra vista",
@"tucson",
@"yuma"];
self.Arkansas = @[@"fayetteville",
@"fort smith",
@"jonesboro",
@"little rock",
@"texarkana"];
self.California = @[@"bakersfield",
@"chico",
@"fresno / madera",
@"gold country",
@"hanford-corcoran",
@"humboldt county",
@"imperial county",
@"inland empire",
@"los angeles",
@"mendocino county",
@"merced",
@"modesto",
@"monterey bay",
@"orange county",
@"palm springs",
@"redding",
@"sacramento",
@"san diego",
@"san francisco bay area",
@"san luis obispo",
@"santa barbara",
@"santa maria",
@"siskiyou county",
@"stockton",
@"susanville",
@"ventura county",
@"visalia-tulare",
@"yuba-sutter"];
self.Colorado = @[@"boulder",
@"colorado springs",
@"denver",
@"eastern CO",
@"fort collins / north CO",
@"high rockies",
@"pueblo",
@"western slope"];
self.Connecticut = @[@"eastern CT",
@"hartford",
@"new haven",
@"northwest CT"];
self.Delaware = @[@"delware"];
self.Florida = @[@"daytona beach",
@"florida keys",
@"fort lauderdale",
@"ft myers / SW florida",
@"gainesville",
@"heartland florida",
@"jacksonville",
@"lakeland",
@"north central FL",
@"ocala",
@"okaloosa / walton",
@"orlando",
@"panama city",
@"pensacola",
@"sarasota-bradenton",
@"south florida",
@"space coast",
@"st augustine",
@"tallahassee",
@"tampa bay area",
@"treasure coast",
@"west palm beach"];
self.Georgia = @[@"albany",
@"athens",
@"atlanta",
@"augusta",
@"brunswick",
@"columbus",
@"macon / warner robins",
@"northwest GA",
@"savannah / hinesville",
@"statesboro",
@"valdosta"];
self.Hawaii = @[@"hawaii"];
self.Idaho = @[@"boise",
@"east idaho",
@"lewiston / clarkston",
@"twin falls"];
self.Illinois = @[@"bloomington-normal",
@"champaign urbana",
@"chicago",
@"decatur",
@"la salle co",
@"mattoon-charleston",
@"peoria",
@"rockford",
@"southern illinois",
@"springfield",
@"western IL"];
self.Indiana = @[@"bloomington",
@"evansville",
@"fort wayne",
@"indianapolis",
@"kokomo",
@"lafayette / west lafayette",
@"muncie / anderson",
@"richmond",
@"south bend / michiana",
@"terre haute"];
self.Iowa = @[@"ames",
@"cedar rapids",
@"des moines",
@"dubuque",
@"fort dodge",
@"iowa city",
@"mason city",
@"quad cities",
@"sioux city",
@"southeast IA",
@"waterloo / cedar falls"];
self.Kansas = @[@"lawrence",
@"manhattan",
@"northwest KS",
@"salina",
@"southeast KS",
@"southwest KS",
@"topeka",
@"wichita"];
self.Kentucky = @[@"bowling green",
@"eastern kentucky",
@"lexington",
@"louisville",
@"owensboro",
@"western KY"];
self.Louisiana = @[@"baton rouge",
@"central louisiana",
@"houma",
@"lafayette",
@"lake charles",
@"monroe",
@"new orleans",
@"shreveport"];
self.Maine = @[@"maine"];
self.Maryland = @[@"annapolis",
@"baltimore",
@"eastern shore",
@"frederick",
@"southern maryland",
@"western maryland"];
self.Massachusetts = @[@"boston",
@"cape cod / islands",
@"south coast",
@"western massachusetts",
@"worcester / central MA"];
self.Michigan = @[@"ann arbor",
@"battle creek",
@"central michigan",
@"detroit metro",
@"flint",
@"grand rapids",
@"holland",
@"jackson",
@"kalamazoo",
@"lansing",
@"monroe",
@"muskegon",
@"northern michigan",
@"port huron",
@"saginaw-midland-baycity",
@"southwest michigan",
@"the thumb",
@"upper peninsula"];
self.Mississippi = @[@"gulfport / biloxi",
@"hattiesburg",
@"jackson",
@"meridian",
@"north mississippi",
@"southwest MS"];
self.Minnesota = @[@"bemidji",
@"brainerd",
@"duluth / superior",
@"mankato",
@"minneapolis / st paul",
@"rochester",
@"southwest MN",
@"st cloud"];
self.Missouri = @[@"columbia / jeff city",
@"joplin",
@"kansas city",
@"kirksville",
@"lake of the ozarks",
@"southeast missouri",
@"springfield",
@"st joseph",
@"st louis"];
self.Montana = @[@"billings",
@"bozeman",
@"butte",
@"great falls",
@"helena",
@"kalispell",
@"missoula",
@"eastern montana"];
self.Nebraska = @[@"grand island",
@"lincoln",
@"north platte",
@"omaha / council bluffs",
@"scottsbluff / panhandle"];
self.Nevada = @[@"elko",
@"las vegas",
@"reno / tahoe"];
self.NewHampshire = @[@"New Hampshire"];
self.NewJersey = @[@"central NJ",
@"jersey shore",
@"north jersey",
@"south jersey"];
self.NewMexico = @[@"albuquerque",
@"clovis / portales",
@"farmington",
@"las cruces",
@"roswell / carlsbad",
@"santa fe / taos"];
self.NewYork = @[@"albany",
@"binghamton",
@"buffalo",
@"catskills",
@"chautauqua",
@"elmira-corning",
@"finger lakes",
@"glens falls",
@"hudson valley",
@"ithaca",
@"long island",
@"new york city",
@"oneonta",
@"plattsburgh-adirondacks",
@"potsdam-canton-massena",
@"rochester",
@"syracuse",
@"twin tiers NY/PA",
@"utica-rome-oneida",
@"watertown"];
self.NorthCarolina = @[@"asheville",
@"boone",
@"charlotte",
@"eastern NC",
@"fayetteville",
@"greensboro",
@"hickory / lenoir",
@"jacksonville",
@"outer banks",
@"raleigh / durham / CH",
@"wilmington",
@"winston-salem"];
self.NorthDakota = @[@"bismarck",
@"fargo / moorhead",
@"grand forks",
@"north dakota"];
self.Ohio = @[@"akron / canton",
@"ashtabula",
@"athens",
@"chillicothe",
@"cincinnati",
@"cleveland",
@"columbus",
@"dayton / springfield",
@"lima / findlay",
@"mansfield",
@"sandusky",
@"toledo",
@"tuscarawas co",
@"youngstown",
@"zanesville / cambridge"];
self.Oklahoma = @[@"lawton",
@"northwest OK",
@"oklahoma city",
@"stillwater",
@"tulsa"];
self.Oregon = @[@"bend",
@"corvallis/albany",
@"east oregon",
@"eugene",
@"klamath falls",
@"medford-ashland",
@"oregon coast",
@"portland",
@"roseburg",
@"salem"];
self.Pennsylvania = @[@"altoona-johnstown",
@"cumberland valley",
@"erie",
@"harrisburg",
@"lancaster",
@"lehigh valley",
@"meadville",
@"philadelphia",
@"pittsburgh",
@"poconos",
@"reading",
@"scranton / wilkes-barre",
@"state college",
@"williamsport",
@"york"];
self.RhodeIsland = @[@"Rhode Island"];
self.SouthCarolina = @[@"charleston",
@"columbia",
@"florence",
@"greenville / upstate",
@"hilton head",
@"myrtle beach"];
self.SouthDakota = @[@"northeast SD",
@"pierre / central SD",
@"rapid city / west SD",
@"sioux falls / SE SD",
@"south dakota"];
self.Tennessee = @[@"chattanooga",
@"clarksville",
@"cookeville",
@"jackson",
@"knoxville",
@"memphis",
@"nashville",
@"tri-cities"];
self.Texas = @[@"abilene",
@"amarillo",
@"austin",
@"beaumont / port arthur",
@"brownsville",
@"college station",
@"corpus christi",
@"dallas / fort worth",
@"deep east texas",
@"del rio / eagle pass",
@"el paso",
@"galveston",
@"houston",
@"killeen / temple / ft hood",
@"laredo",
@"lubbock",
@"mcallen / edinburg",
@"odessa / midland",
@"san angelo",
@"san antonio",
@"san marcos",
@"southwest TX",
@"texoma",
@"tyler / east TX",
@"victoria",
@"waco",
@"wichita falls"];
self.Utah = @[@"logan",
@"ogden-clearfield",
@"provo / orem",
@"salt lake city",
@"st george"];
self.Vermont = @[@"Vermont"];
self.Virginia = @[@"charlottesville",
@"danville",
@"fredericksburg",
@"hampton roads",
@"harrisonburg",
@"lynchburg",
@"new river valley",
@"richmond",
@"roanoke",
@"southwest VA",
@"winchester"];
self.Washington = @[@"bellingham",
@"kennewick-pasco-richland",
@"moses lake",
@"olympic peninsula",
@"pullman / moscow",
@"seattle-tacoma",
@"skagit / island / SJI",
@"spokane / coeur d'alene",
@"wenatchee",
@"yakima"];
self.WestVirginia = @[@"charleston",
@"eastern panhandle",
@"huntington-ashland",
@"morgantown",
@"northern panhandle",
@"parkersburg-marietta",
@"southern WV",
@"west virginia (old)"];
self.Wisconsin = @[@"appleton-oshkosh-FDL",
@"eau claire",
@"green bay",
@"janesville",
@"kenosha-racine",
@"la crosse",
@"madison",
@"milwaukee",
@"northern WI",
@"sheboygan",
@"wausau"];
self.Wyoming = @[@"Wyoming"];
NSMutableDictionary *dic1=[[NSMutableDictionary alloc]init];
[dic1 setValue:@"Alabama" forKey:@"state"];
[dic1 setValue:self.Alabama forKey:@"cities"];
NSMutableDictionary *dic2=[[NSMutableDictionary alloc]init];
[dic2 setValue:@"Alaska" forKey:@"state"];
[dic2 setValue:self.Alaska forKey:@"cities"];
NSMutableDictionary *dic3=[[NSMutableDictionary alloc]init];
[dic3 setValue:@"Arizona" forKey:@"states"];
[dic3 setValue:self.Arizona forKey:@"cities"];
NSMutableDictionary *dic4=[[NSMutableDictionary alloc]init];
[dic4 setValue:@"Arkansas" forKey:@"states"];
[dic4 setValue:self.Arkansas forKey:@"cities"];
NSMutableDictionary *dic5=[[NSMutableDictionary alloc]init];
[dic5 setValue:@"California" forKey:@"states"];
[dic5 setValue:self.California forKey:@"cities"];
NSMutableDictionary *dic6=[[NSMutableDictionary alloc]init];
[dic6 setValue:@"Colorado" forKey:@"states"];
[dic6 setValue:self.Colorado forKey:@"cities"];
NSMutableDictionary *dic7=[[NSMutableDictionary alloc]init];
[dic7 setValue:@"Connecticut" forKey:@"state"];
[dic7 setValue:self.Connecticut forKey:@"cities"];
NSMutableDictionary *dic8=[[NSMutableDictionary alloc]init];
[dic8 setValue:@"Delaware" forKey:@"state"];
[dic8 setValue:self.Delaware forKey:@"cities"];
NSMutableDictionary *dic9=[[NSMutableDictionary alloc]init];
[dic9 setValue:@"Florida" forKey:@"states"];
[dic9 setValue:self.Florida forKey:@"cities"];
NSMutableDictionary *dic10=[[NSMutableDictionary alloc]init];
[dic10 setValue:@"Georgia" forKey:@"states"];
[dic10 setValue:self.Georgia forKey:@"cities"];
NSMutableDictionary *dic11=[[NSMutableDictionary alloc]init];
[dic11 setValue:@"Hawaii" forKey:@"states"];
[dic11 setValue:self.Hawaii forKey:@"cities"];
NSMutableDictionary *dic12=[[NSMutableDictionary alloc]init];
[dic12 setValue:@"Idaho" forKey:@"states"];
[dic12 setValue:self.Idaho forKey:@"cities"];
NSMutableDictionary *dic13=[[NSMutableDictionary alloc]init];
[dic13 setValue:@"Illinois" forKey:@"state"];
[dic13 setValue:self.Illinois forKey:@"cities"];
NSMutableDictionary *dic14=[[NSMutableDictionary alloc]init];
[dic14 setValue:@"Indiana" forKey:@"state"];
[dic14 setValue:self.Indiana forKey:@"cities"];
NSMutableDictionary *dic15=[[NSMutableDictionary alloc]init];
[dic15 setValue:@"Iowa" forKey:@"states"];
[dic15 setValue:self.Iowa forKey:@"cities"];
NSMutableDictionary *dic16=[[NSMutableDictionary alloc]init];
[dic16 setValue:@"Kansas" forKey:@"states"];
[dic16 setValue:self.Kansas forKey:@"cities"];
NSMutableDictionary *dic17=[[NSMutableDictionary alloc]init];
[dic17 setValue:@"Kentucky" forKey:@"states"];
[dic17 setValue:self.Kentucky forKey:@"cities"];
NSMutableDictionary *dic18=[[NSMutableDictionary alloc]init];
[dic18 setValue:@"Louisiana" forKey:@"states"];
[dic18 setValue:self.Louisiana forKey:@"cities"];
NSMutableDictionary *dic19=[[NSMutableDictionary alloc]init];
[dic19 setValue:@"Maine" forKey:@"state"];
[dic19 setValue:self.Maine forKey:@"cities"];
NSMutableDictionary *dic20=[[NSMutableDictionary alloc]init];
[dic20 setValue:@"Maryland" forKey:@"state"];
[dic20 setValue:self.Maryland forKey:@"cities"];
NSMutableDictionary *dic21=[[NSMutableDictionary alloc]init];
[dic21 setValue:@"Massachusetts" forKey:@"states"];
[dic21 setValue:self.Massachusetts forKey:@"cities"];
NSMutableDictionary *dic22=[[NSMutableDictionary alloc]init];
[dic22 setValue:@"Michigan" forKey:@"states"];
[dic22 setValue:self.Michigan forKey:@"cities"];
NSMutableDictionary *dic23=[[NSMutableDictionary alloc]init];
[dic23 setValue:@"Minnesota" forKey:@"states"];
[dic23 setValue:self.Minnesota forKey:@"cities"];
NSMutableDictionary *dic24=[[NSMutableDictionary alloc]init];
[dic24 setValue:@"Mississippi" forKey:@"states"];
[dic24 setValue:self.Mississippi forKey:@"cities"];
NSMutableDictionary *dic25=[[NSMutableDictionary alloc]init];
[dic25 setValue:@"Missouri" forKey:@"states"];
[dic25 setValue:self.Missouri forKey:@"cities"];
NSMutableDictionary *dic26=[[NSMutableDictionary alloc]init];
[dic26 setValue:@"Montana" forKey:@"states"];
[dic26 setValue:self.Montana forKey:@"cities"];
NSMutableDictionary *dic27=[[NSMutableDictionary alloc]init];
[dic27 setValue:@"Nebraska" forKey:@"states"];
[dic27 setValue:self.Nebraska forKey:@"cities"];
NSMutableDictionary *dic28=[[NSMutableDictionary alloc]init];
[dic28 setValue:@"Nevada" forKey:@"states"];
[dic28 setValue:self.Nevada forKey:@"cities"];
最佳答案
我建议为每个州设置一个类,其中您有诸如州的 NSString 和包含所有相应城市的数组之类的属性。然后,将状态对象存储在以状态名称作为键的字典中。
关于ios - 创建一个城市和州的字典,以便在 UITableView 中存储一个字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19236555/
我需要将文本放在 中在一个 Div 中,在另一个 Div 中,在另一个 Div 中。所以这是它的样子: #document Change PIN
奇怪的事情发生了。 我有一个基本的 html 代码。 html,头部, body 。(因为我收到了一些反对票,这里是完整的代码) 这是我的CSS: html { backgroun
我正在尝试将 Assets 中的一组图像加载到 UICollectionview 中存在的 ImageView 中,但每当我运行应用程序时它都会显示错误。而且也没有显示图像。 我在ViewDidLoa
我需要根据带参数的 perl 脚本的输出更改一些环境变量。在 tcsh 中,我可以使用别名命令来评估 perl 脚本的输出。 tcsh: alias setsdk 'eval `/localhome/
我使用 Windows 身份验证创建了一个新的 Blazor(服务器端)应用程序,并使用 IIS Express 运行它。它将显示一条消息“Hello Domain\User!”来自右上方的以下 Ra
这是我的方法 void login(Event event);我想知道 Kotlin 中应该如何 最佳答案 在 Kotlin 中通配符运算符是 * 。它指示编译器它是未知的,但一旦知道,就不会有其他类
看下面的代码 for story in book if story.title.length < 140 - var story
我正在尝试用 C 语言学习字符串处理。我写了一个程序,它存储了一些音乐轨道,并帮助用户检查他/她想到的歌曲是否存在于存储的轨道中。这是通过要求用户输入一串字符来完成的。然后程序使用 strstr()
我正在学习 sscanf 并遇到如下格式字符串: sscanf("%[^:]:%[^*=]%*[*=]%n",a,b,&c); 我理解 %[^:] 部分意味着扫描直到遇到 ':' 并将其分配给 a。:
def char_check(x,y): if (str(x) in y or x.find(y) > -1) or (str(y) in x or y.find(x) > -1):
我有一种情况,我想将文本文件中的现有行包含到一个新 block 中。 line 1 line 2 line in block line 3 line 4 应该变成 line 1 line 2 line
我有一个新项目,我正在尝试设置 Django 调试工具栏。首先,我尝试了快速设置,它只涉及将 'debug_toolbar' 添加到我的已安装应用程序列表中。有了这个,当我转到我的根 URL 时,调试
在 Matlab 中,如果我有一个函数 f,例如签名是 f(a,b,c),我可以创建一个只有一个变量 b 的函数,它将使用固定的 a=a1 和 c=c1 调用 f: g = @(b) f(a1, b,
我不明白为什么 ForEach 中的元素之间有多余的垂直间距在 VStack 里面在 ScrollView 里面使用 GeometryReader 时渲染自定义水平分隔线。 Scrol
我想知道,是否有关于何时使用 session 和 cookie 的指南或最佳实践? 什么应该和什么不应该存储在其中?谢谢! 最佳答案 这些文档很好地了解了 session cookie 的安全问题以及
我在 scipy/numpy 中有一个 Nx3 矩阵,我想用它制作一个 3 维条形图,其中 X 轴和 Y 轴由矩阵的第一列和第二列的值、高度确定每个条形的 是矩阵中的第三列,条形的数量由 N 确定。
假设我用两种不同的方式初始化信号量 sem_init(&randomsem,0,1) sem_init(&randomsem,0,0) 现在, sem_wait(&randomsem) 在这两种情况下
我怀疑该值如何存储在“WORD”中,因为 PStr 包含实际输出。? 既然Pstr中存储的是小写到大写的字母,那么在printf中如何将其给出为“WORD”。有人可以吗?解释一下? #include
我有一个 3x3 数组: var my_array = [[0,1,2], [3,4,5], [6,7,8]]; 并想获得它的第一个 2
我意识到您可以使用如下方式轻松检查焦点: var hasFocus = true; $(window).blur(function(){ hasFocus = false; }); $(win
我是一名优秀的程序员,十分优秀!